This may not be a bug, but it is certainly a very important validation that should happen for duplicate attachment post-slug when editing and adding Media, just like there is a validation on Edit Page/Post page.
I spent half the day trying to figure out why my page was displaying images everywhere where apply_filter(‘the_content’ …) was called.
It turns out I had an attachment with the same post slug as a page, so the attachment page was being displayed instead of the page I was looking for.
The solution was simple: either change the page post-slug or the conflicting attachment post-slug, but tracking down the problem was very difficult.
Hope it will be fixed in future releases. There is one more solution you did not mentioned. Not necessary change slugs, just insert the buggy attachement into the page (any page or post), save, and then you may remove it from the content. The image will remain in the page’s gallery (so the attachement will have “parent”) and that is enough for dissapearing the bug.
Viewing 1 replies (of 1 total)
The topic ‘attachment post-slug not being checked for duplicates’ is closed to new replies.