[wp-hackers] Editing a tag also edits a matching category

Callum Macdonald lists.automattic.com at callum-macdonald.com
Fri Mar 21 09:38:04 GMT 2008


When you edit a category, you are actually editing the term and not the 
taxonomy. This means that if you have a category and a tag with the same 
underlying term, things can get out of sync.

The simplest example is regarding case. If you create a post and tag it 
"photos" then create another post and add a category "Photos", the 
category will be called "photos" because that's the name of the existing 
term with the same slug. If you edit that category and change it to 
"Photos" then the tag will also be changed to "Photos". Likewise, if you 
decide to edit a category slug, it will edit the slug of the 
corresponding tag (if the tag exists), and vice versa.

I think this is a fundamental bug in the term / taxonomy system. I've 
been looking through the code in some detail recently (doing some stuff 
on WPMU) and I've come to the conclusion that tags and categories are 
fundamentally different. For example, in WPMU, tags can easily be used 
globally, while categories cannot. Categories have descriptions and 
parents which might be different on each wpmu blog, tags do not.

I'm not proposing anything at this point. I'm keen to explore what other 
people think on the subject. Anyone have an opinion to share?

Cheers - Callum.

More information about the wp-hackers mailing list