[wp-trac] [WordPress Trac] #41511: Attachment page URL not created correctly for image uploaded directly to library before being added to post
WordPress Trac
noreply at wordpress.org
Tue Aug 1 10:11:57 UTC 2017
#41511: Attachment page URL not created correctly for image uploaded directly to
library before being added to post
--------------------------+-----------------------------
Reporter: kokkieh | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 4.8
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
=== To replicate: ===
1. Visit Media ->Add New and upload a media file
2. Visit Posts ->Add New
3. Click Add Media
3. Select the media file previously uploaded and set Link To setting to
Attachment Page
4. Publish the post
5. 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 [http://en.forums.wordpress.com/topic/problems-with-
images-and-attachment-page-custom-url-settings WordPress.com support
forums], but I've confirmed it on a non-WordPress.com site as well.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41511>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list