Permalink conflict: image attachment page and post when permalink setting is /%postname%/
|Reported by:||augustas||Owned by:||SergeyBiryukov|
|Component:||Permalinks||Keywords:||4.4-early has-patch has-unit-tests|
Here is scenario when there is a permalink conflict between the "attachment page" URL and post when image filename and post name are equal:
Permalinks are set to /%postname%/
Using Media -> Library -> upload new image called about-me.jpg
System saves into "wp_posts" database table: post_name = "about-me"
I publish a new POST with the title "About Me". For this post database stores the post_name = "about-me"
If I go to URL: www.example.com/about-me/ - I am redirected to about-me.jpg Image Attachment Page.
If POST is created first and the image uploaded second - URL will open the POST.
This issue is similar to #13459
Change History (21)
- Summary changed from Permalink conflict when image is not attached to the post and permalink setting is /%postname%/ to Permalink conflict: image attachment page and post when permalink setting is /%postname%/
3 years ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
2 years ago
- Milestone set to Awaiting Review
- Resolution duplicate deleted
- Status changed from closed to reopened
2 years ago
- Keywords has-patch needs-unit-tests added
- Version changed from 3.5.1 to 3.3
- Keywords 4.4-early added
- Milestone changed from Awaiting Review to Future Release
- Owner set to SergeyBiryukov
- Status changed from reopened to accepted
in reply to:
4 months ago
- Keywords has-patch has-unit-tests added; needs-unit-tests needs-patch removed