• 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 15 replies - 1 through 15 (of 16 total)
  • I’m having the same problem.

    It seems even if you use parent categories ie are building a good structure or taxonomy you still can’t have multiple duplicate children, even if the children are from “different parents” and that’s a key point here, different parents. It’s like saying there’s only ever going to be one Tom one Dick and one Harry in the world EVER no more no less. Hardly flexible, when you look at the real world I know multiple Sarah’s who’ve come from different parents and I can tell the difference between them fine ??

    tdishman

    (@tdishman)

    This is an incredibly frustrating issue, particularly for someone just starting with WP and hoping to accomplish a simple taxonomy. As a developer myself, it seems unimaginable that I wouldn’t be allowed to create a simple taxonomy such as:

    books/children
    toys/children

    I have to jump through hoops to have multiple categories named “Children”. And then God forbid if I would want to have “children-books” as a tag slug when I’ve already had to use this slug for a category just to get in the ballpark of what I wanted to do.

    Very frustrating.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    You should be able to customize the slugs, to a degree, but having children categories does tend to goober it up a bit.

    This definitely is extremely frustrating. I was hoping that it would go into 2.0, but alas!

    ^ 2.9* I meant.

    Yep, I had my problems with this. You have nice unique numerical ID’s for categories but WP ignores them in an XML export/import. It just creates new ones.
    And when learning, I build my own theme, leaning heavenly on this: https://codex.www.ads-software.com/Template_Tags/query_posts#Parameters where numerical ID’s are promoted or at least heavily used as an example.

    Just letting you know that is is possible to have the same category and tag slug.

    Some of them allowed me to use it straight away, others i couldn’t change them to be the same.

    However, if i delete the tag slug and recreated it then allowed me to use the same name.

    Still not ideal, but possible workaround for you.

    This is lame… does anybody have a workaround or any advice how to edit the auto-formatting in the backend?

    Any idea where to screw up the auto-formatting?

    yikes.. looks like the slug must be unique in the table wp_terms

    In WordPress 3.0, removing the “unique” on the wp_terms table doesn’t seem to impact performance and everything seems to work.

    This change is absurd. Tags and slugs need to be able to handle different taxonomies and they should not break each other.

    Until this is fixed, taxonomies are basically broken.

    Yeah, i can’t have the same slug for my blog category of the same name of my portfolio category. Very annoying. WordPress adds a “-2” to the duplicate. Why won’t wordpress fix this?

    This is extremely discouraging especially when factoring in wordpress’ reputation for cleanliness and SEO-friendliness. What’s even more frustrating is how this issue has been brought up by numerous wordpress users yet the development team will not acknowledge it nor offer an explanation.

    In WordPress 3.0, removing the “unique” on the wp_terms table doesn’t seem to impact performance and everything seems to work.

    How did you remove the unique attribute? I’m using phpMyAdmin and can’t figure it out.

    You can count me in as being frustrated about this…

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