Opened 7 months ago
Last modified 7 months ago
#22671 new defect (bug)
Attachment pages 404 for media attached to an "Auto Draft"
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Media | Version: | 3.4.2 |
| Severity: | normal | Keywords: | close |
| Cc: |
Description
Any image uploaded to a new post through the post editor or QuickPress has a broken View link in the Media Library. To reproduce:
- Go to Dashboard.
- Upload an image in QuickPress.
- Go to Media Library.
- Click the View link for the image.
Expected result:
I thought it was going to show me the image or the image's attachment page.
Actual result:
"This is somewhat embarrassing, isn't it?" - 404 message from URL like /?attachment_id=112
This won't happen if the image is uploaded via the Upload New Media page.
Attachments (2)
Change History (15)
comment:2
in reply to:
↑ 1
;
follow-up:
↓ 3
miqrogroove
— 7 months ago
Replying to ocean90:
The same happens, when you upload an image to a non-public post, like a pending post.
ocean90, I am unable to reproduce the behavior you're describing here. If I attach an image to a normal draft and save it, then the View link is not broken in Media Library.
comment:3
in reply to:
↑ 2
;
follow-up:
↓ 4
SergeyBiryukov
— 7 months ago
Replying to miqrogroove:
ocean90, I am unable to reproduce the behavior you're describing here. If I attach an image to a normal draft and save it, then the View link is not broken in Media Library.
I can reproduce the 404 message when I'm logged out.
comment:4
in reply to:
↑ 3
;
follow-up:
↓ 5
miqrogroove
— 7 months ago
Replying to SergeyBiryukov:
I can reproduce the 404 message when I'm logged out.
If you're logged out, how are you seeing the Media Library?
comment:5
in reply to:
↑ 4
;
follow-up:
↓ 6
ocean90
— 7 months ago
- Keywords close added
Replying to miqrogroove:
If you're logged out, how are you seeing the Media Library?
You can copy the attachment link and paste it to a private tab for example… It's just an example for how core does handle the post status of attachments. And that it's expected.
comment:6
in reply to:
↑ 5
miqrogroove
— 7 months ago
Replying to ocean90:
You can copy the attachment link and paste it to a private tab for example… It's just an example for how core does handle the post status of attachments. And that it's expected.
Actually I don't see how that is relevant. I am getting broken links depending on which admin page I use to upload images. I am not copying links between browsers.
comment:7
follow-up:
↓ 8
nacin
— 7 months ago
Images attached to a post inherit the post's status. Images uploaded separately (and thus unattached) are simply published as-is. That's the relevance.
comment:8
in reply to:
↑ 7
miqrogroove
— 7 months ago
Replying to nacin:
Images attached to a post inherit the post's status. Images uploaded separately (and thus unattached) are simply published as-is. That's the relevance.
Still confused here. Err... You are drawing an analogy between what is supposed to be publicly viewable vs. publicly inaccessible. While I don't disagree with that information, it is inconsistent with the bug I'm reporting. I think we need a matrix to explain this:
+------+----------+-----+----------+ |Viewer|Unattached|Draft|Auto-Draft| +------+----------+-----+----------+ |Admin | OK | OK | 404 | +------+----------+-----+----------+ |Public| OK | 404 | 404 | +------+----------+-----+----------+
Whether or not things are publicly viewable, they should not have broken links on the admin side.
comment:9
miqrogroove
— 7 months ago
Also, in addition to the broken View link, after clicking the Edit link for one of these images a broken link gets added to the toolbar that says "View Attachment Page".
comment:10
miqrogroove
— 7 months ago
The broken "View Attachment Page" link is new in 3.5. Do you need a separate ticket for that?
comment:11
follow-up:
↓ 12
helenyhou
— 7 months ago
Thinking through it a bit, it seems to me that there's a base issue of why attachments get attached to auto drafts that are no longer accessible to edit in the admin, except from the "Uploaded to" column on the media list table. We can hide the link, but that doesn't change the weirdness of having an "Auto Draft" post that doesn't show up in the posts list table.
comment:12
in reply to:
↑ 11
miqrogroove
— 7 months ago
Replying to helenyhou:
We can hide the link, but that doesn't change the weirdness of having an "Auto Draft" post that doesn't show up in the posts list table.
Also, there's no way to attach auto-draft images to new posts. You can insert them, but if you link them to the Attachment Page those will be broken too.
comment:13
helenyhou
— 7 months ago
- Summary changed from Media View Links Are 404 to Attachment pages 404 for media attached to an "Auto Draft"
To you get the message when you are logged in?