Opened 17 years ago
Closed 16 years ago
#6542 closed defect (bug) (duplicate)
Child Categories error out as Duplicates
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | major | Version: | 2.5 |
Component: | Administration | Keywords: | Child Categories Duplicates |
Focuses: | Cc: |
Description
Hi,
Great work, love WordPress but this recent issue has been a thorn. I really hope that we can sort it out.
After upgrading to Wordpress 2.5 I am getting this error when trying to add a new child category when the name of a that category exists within a different parent.
For example, if I have:
Photos
-Summer
and then I try to add a new category called Summer with a different parent like:
Videos
-Summer
Wordpress is throwing an error:
"The category you are trying to create already exists."
From forum mod -> Duplicate Category (and Tag) names are no longer allowed.
---
I think this is a big mistake and will force at least two clients of mine to continue to use pre 2.5 versions or rather I will have to attempt to fix it myself.
From my perspective categories with different parents or levels should be able to have the same literal name. CatA->Apple, CatB->Apple are not the same thing and should be allowed.
Thanks in advance.
Harold
See also ticket #3799
improvements for submitting new categories via wp-admin/categories.php
http://trac.wordpress.org/ticket/3799
Original Forum Post:
http://wordpress.org/support/topic/164615?replies=1#post-718138
From forums (wordmonkey):
I think there's a work around on this - I was using duplicate names for categories and, again, it's essential for me that a child of one category could have the same name as a child in the other.
I've managed to get around this by ensuring that the Category Slug for each is different. That seems to be the element that Wordpress is checking for duplicates. So make your two new categories but put a spelling mistake or something in the category name of the second one. When it's made, go back and edit the Category Name to the words you want but make sure to also change the Category Slug to a corrected version with extra words in it - maybe a reference to which parent it refers to or something like that.
So in your example, you could make a child category Summer in parent category Photos, no problem. When making the second, initially create it a Sumer in Video. Then edit the category once it's made, correct the Sumer to Summer and rename the slug to something like summer-videos.
Seems to work.