Support » Requests and Feedback » Bug: Cannot have duplicate category and tag slugs

  • When you try to create a category and there is an existing tag with the same slug, 2.7.1 onwards rewrites the category slug to child-slug-parent-slug or adds a digit to the slug. It started with 2.7.1 but updating from earlier versions keeps the existing category slugs even if the tag slug exists; it won’t however let you create new ones that duplicate tag slugs.

    e.g. if tag doesn’t exist:
    Parent category: Make Money, slug make-money
    Child category: Internet Marketing, slug internet-marketing – which is correct and expected.

    However if tag internet-marketing already exists, child category gets rewritten as internet-marketing-make-money

    My workaround is to create the categories first as I want them, and then the tag slugs using a _ in place of a hyphen for the tags, e.g. category internet-marketing, tag internet_marketing. This however is not acceptable as the standard format for tags uses a hyphen.

Viewing 16 replies (of 16 total)
  • dorianj

    (@dorianj)

    BTW, I figured out how to remove the “unique” on the wp_terms table and it DOES break things. The site still works, but if you navigate to a page that has the same slug as another, it will always load the first page created with that slug.

Viewing 16 replies (of 16 total)
  • The topic ‘Bug: Cannot have duplicate category and tag slugs’ is closed to new replies.