﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
11361,"Creating a term with the same name as a category, destroy the category.",giovans,filosofo,"I create a blog, and a taxonomy of categories. [[BR]]

Let's say that one of them is Internet (with any slug you want, ie: internet-89).[[BR]]

Then I add some posts over the blog, and some post is in the Internet category.[[BR]]

So, now, I enter a new post, on any category, which contains the term ""Internet"" as a tag. [[BR]]

When the tag is created, the category Internet is destroyed and replaced by a number.[[BR]]

---[[BR]]

I have tracked down the problem over the code.
The thing happen on wp-includes/taxonomy.php in the wp_insert_term procedure. Specifically on this line:[[BR]]

if ( ! $term_id = is_term($slug) ) {[[BR]]


At this point, $slug contains the sanitized name of the term.
is_term returns the id of the category (Internet, remember?), instead of nothing, or by signalling an error. After this, the filter term_id_filter is called and the global_terms procedure does the damage to the category.[[BR]]


In my humble opinion. the is_term procedure, should be called as:
is_term($slug,$taxonomy) thus separating ""category"" and ""post_tags"".[[BR]]


Greetings and thanks for the support.[[BR]]


Giovans[[BR]]









",defect (bug),closed,normal,,Taxonomy,2.8.5,normal,invalid,,giovanni@…
