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.
- The topic ‘Bug: Cannot have duplicate category and tag slugs’ is closed to new replies.