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 (2)
- 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%/