• I have had an ongoing issue. I’m seeing it on two dev sites running 2.6.2 and a live site running 2.5.2.

    There is a category showing up in my category list as “true”. The category list is alphabetical, but this item is the first item in the list. The link goes back to the base URL. My bug report from June says:

    There appears to be an error in the way the category list is being retrieved. It may be an extra line in the table, left over from when I was setting up post via email and was changing the default category.

    I got distracted by a lot of other projects and am now just coming back to my blog, so unfortunately I don’t remember exactly how I broke it. My default category is called “Random”, which I believe I fiddled with.

    I found the post regarding ghost subcategories at http://wordpress.org/support/topic/174163?replies=4. I did identify an extra record in wp_jwc0sa_term_taxonomy that described a category title that doesn’t show up in the category list. I also found a record in wp_jwc0sa_terms that identified the unwanted category. I deleted both of them, but I’m still seeing “true”.

    I took a look at categories.php to get an idea of how the catlist is constructed, but I found a lot of references to other functions. I figure I’m going to be doing a lot of grepping tonight, but if someone could be so kind as to point me towards the include that houses the actual functions I’d really appreciate it. Additionally, if you know where this ghost is coming from I would greatly appreciate that as well.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter brainycat

    (@brainycat)

    If I’m reading this right it looks like the ghost category must be coming from the SELECT statement from v2.6.2/wp-includes/taxonomies.php line#698… The IN clause is generated from $in_taxonomies, and the only way I can see pulling a NULL from that query is to have bad values in that variable. $in_taxonomies is set right at the top of &get_terms, on line #566…. But I’m seeing this issue on 2.5.2 and 2.6.2… it HAS to be bad data in my db, but I’m not smart enough today to determine how to find the malformed record 🙁

    Thread Starter brainycat

    (@brainycat)

    I deleted all the posts childed to the ghost category in wp_posts, but that didn’t solve the issue either.

    Thread Starter brainycat

    (@brainycat)

    FIXED

    Posts without categories create the “true” category in the cat list. Adding posts to a category and/or removing the categoriless post makes the phantom category disappear. I should take a look at wp_list_cats() and see if it needs a sanity check.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘ghost category shows in category list as “true”’ is closed to new replies.