Adding a Category deletes one – I’m stumped!
-
What happens:
I add a new category either directly, via a new post or third party application (doesn’t matter how I do it, the result is the same).
The new category is successfully created.
In “edit” mode of the new category, the description field contains another category that is auto populated.
I check the category that has been placed in the description field and find that it (the old category) has been automatically deleted from the db.
If I try to add it back, the process is repeated losing yet another category.
So in effect what is happening is when I add a new category it replaces an existing one. The new category is also using the term ID of the deleted category.
***********************************
Additionally, when I add a new category it places the new category in a parent category on occasion. I think it’s doing this when the category that gets replaced is already in a parent category. I’m not sure of this because I didn’t know what I was looking for at the and I can’t keep testing it because of losing more categories.
***********************************
The posts that were previously associated with the deleted category are now associated with the new category. So I have to edit the old post and remove the new category that replaced the old one.
***********************************
What I did before this started happening:
I upgraded to 2.6. I had some issues with it.
I was bad and hadn’t upgraded since 2.2 so that’s my first mistake and probably the biggest in retrospect.
The second was my original install was via Fantasico.
The third was that when I upgraded I used a plugin called “Instant Upgrade”
The upgrade went through quickly without a hitch until I noticed like so many others who upgraded to 2.6 from an early version, my categories were missing.
I found a fix for this and using my backup I ran the following queries on the new db.
update wp_terms wt, wp_categories wc set wt.name=wc.category_nicename, wt.slug=wc.category_nicename where wt.term_id=wc.cat_ID
update wp_term_taxonomy wt, wp_categories wc set wt.description=wc.cat_name where wt.term_id=wc.cat_ID
update wp_term_taxonomy wt, wp_categories wc set wt.parent=wc.category_parent where wt.term_id=wc.cat_ID
Voila! All my cats were back and all was good or so I thought until I noticed they were being killed one by one when adding a new one.
I’ve tried disabling all of my plugins to see if somehow one of them was causing this. Nope, not it. I didn’t think that would be it anyway, so the test was really just out of desperation.
***********************************
There is no workaround that I’ve discovered except to not create new categories. I have parent and sub categories, over 100 in total which is why I used the db queries instead of updating them manually like others suggested.
I am stumped and don’t know what to do.
I feel my only option here is to revert to my previous installation and try again. But if I do I’ll lose the posts I’ve created since upgrading. I’ve tried reinstalling 2.6 in case something didn’t copy over correctly but the result was the same.
Another option might be to start completely fresh with a new WP install. That would mean backing up everything (which I do monthly) but I’m afraid that my db may be messed up if that’s what is causing this. To start over I’d have to use the xml export/import function and I have no clue what happens to my image files, etc in that case.
If anyone has any suggestions or knows where I need to be looking to resolve this please jump in to help if you can. I’ve searched and searched for answers but to be honest all the results are clouded by the recent 2.6 lost categories issues. Yes, I had that issue too but it seems to be a separate issue. If not, I haven’t been able to find the relation.
Any help is appreciated.
The topic ‘Adding a Category deletes one – I’m stumped!’ is closed to new replies.