Permalink conflict: image attachment page and post when permalink setting is /%postname%/
|Reported by:||augustas||Owned by:||SergeyBiryukov|
|Component:||Permalinks||Keywords:||has-patch needs-unit-tests 4.4-early|
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 (11)
- 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%/
comment:2 @SergeyBiryukov — 2 years ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
- Milestone set to Awaiting Review
- Resolution duplicate deleted
- Status changed from closed to reopened
- Keywords has-patch needs-unit-tests added
- Version changed from 3.5.1 to 3.3
comment:6 @aaroncampbell — 17 months ago
comment:9 @SergeyBiryukov — 5 days ago
- Keywords 4.4-early added
- Milestone changed from Awaiting Review to Future Release