WordPress.org

Ready to get started?Download WordPress

Forums

attachment post-slug not being checked for duplicates (2 posts)

  1. gworks
    Member
    Posted 3 years ago #

    Hi,

    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.

  2. ejikas
    Member
    Posted 3 years ago #

    Your description is not very clear to me but I think you referring the same bug I just submited to the wordpress trac: http://core.trac.wordpress.org/ticket/16438

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic