Opened 7 years ago
Last modified 7 years ago
#41511 new defect (bug)
Attachment page URL not created correctly for image uploaded directly to library before being added to post
Reported by: | kokkieh | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.8 |
Component: | Editor | Keywords: | |
Focuses: | Cc: |
Description
To replicate:
- Visit Media ->Add New and upload a media file
- Visit Posts ->Add New
- Click Add Media
- Select the media file previously uploaded and set Link To setting to Attachment Page
- Publish the post
- View post and click on image
What I expected:
To be taken to the attachment page for the image
What happened instead:
I got a Page not found error. Additionally the URL is formed as http://SITE_URL/FILE_SLUG/
which is not the correct format for media attachment pages.
I went back to the editor, clicked the image and clicked the edit icon. The Link To setting now shows that I have a Custom URL set instead of Attachment Page.
Updating the setting to attachment page again changes the URL to http://SITE_URL/YEAR/MONTH/POST_SLUG/FILE_SLUG/
If I now update the post, I can click the image to view the attachment page.
Context:
Reported via the WordPress.com support forums, but I've confirmed it on a non-WordPress.com site as well.
Note: See
TracTickets for help on using
tickets.
We're encountering this issue as well in 4.9.4.