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