• Resolved AK Ted

    (@akted)


    If you create a post with a title (and slug) – I’ll use test as an example – and later create a page with the same title/slug, WordPress doesn’t notice the collision and try to change the slug for you. If you try to create/change a post’s slug to an existing post slug, it’ll put a ‘-2’ at the end. Same with a page. But WP doesn’t seem to cross-check between posts and pages.

    Is this a bug, or just the way it is (for whatever reason)?

Viewing 8 replies - 1 through 8 (of 8 total)
  • WP does “check” and notice the potential collision; that’s why WP adds the -2. It’s not a bug. The “whatever reason” is to prevent slug collisions.

    That’s the way WP works to prevent slug collisions. Any site can have a `%postname% permalink structure, and that will show the same slug for a post and page.

    Thread Starter AK Ted

    (@akted)

    What I’m saying is WP does *not* check for collisions between post and page. This was tested on a clean 3.5 install.

    What I’m saying is WP does *not* check for collisions between post and page.

    Yes, it does. And WP adds the -2 to prevent collisions. What’s your definition of “check?”

    Thread Starter AK Ted

    (@akted)

    In my tests it does not put the -2. If, like I said in the OP, you test post-to-post or page-to-page, it does add the -2. But if you have a post with slug “whatever”, and you later add a page “whatever”, WordPress lets you. Same slug for page & post. The post is now inaccessible.

    I agree with AK Ted. I have a new site with 3.5 and it is not checking post slugs to page slugs and adding the -2 like it would if I add another post

    Thread Starter AK Ted

    (@akted)

    Trac ticket created, will update this thread as necessary.

    Thread Starter AK Ted

    (@akted)

    My ticket has been closed and marked as a duplicate of this Trac ticket, which was filed nearly 2 years 8 months ago.

    same problem… and why are moderators so eager to close threads calling them resolved… when … they are not… (in favor of something that was started three years ago)

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Post & Page with the same slug’ is closed to new replies.