WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Unable to assign posts to categories or delete categories

[Resolved] Unable to assign posts to categories or delete categories

  • I discovered tonight that I’m having some very serious problems with categories:

    1. I can create new categories, but I can’t assign posts to them. (It doesn’t make a difference if I create the category in the Categories menu or directly from a post.) If I edit the post (either from the editing view or using QuickEdit), I can check the box for the new category, but as soon as I hit Update, the checkbox disappears and the Categories view shows 0 posts assigned to that category.
    2. I cannot delete any new categories I create. If I click delete in the Categories menu, the category flashes red and disappears, but if I refresh or click on something else and come back to the Categories view, the category is still there. It’s also still in the terms table in the database. The only way to delete the category is to go into phpMyAdmin and drop that row.

    I tried deactivating all plugins and switching to the default (unmodified Twenty Thirteen) theme to see if perhaps there was a theme or plugin conflict, but both above behaviors persisted. I also tried backing everything up and reinstalling WordPress from the Dashboard -> Updates menu, which had no effect.

    I should mention that the data was imported from another WordPress installation. I believe something in the taxonomy tables has gotten messed up in the process. If I look at the database through phpMyAdmin, both the term_relationships and term_taxonomy tables have a red warning message saying, “No index defined.”

    I’m assuming that has something to do with my problem, but I’m not sure how to define the index in phpMyAdmin, nor do I know what it should be defined as.

    Help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • esmi

    @esmi

    Forum Moderator

    Can you replicate this on a vanilla install before importing any existing content?

    For some reason I don’t understand, I wasn’t able to assign the indices for those tables from phpMyAdmin: If I tried to set the primary key, I’d get an error warning me that I had duplicate keys, but if I tried to drop the primary key, I got an error that it didn’t exist!

    Fortunately, I was able to go back to the other installation, copy the term_relationships and term_taxonomy tables, import them into the database, and update them (fortunately, I’d only added one or two things since the import). I renamed those two existing tables and gave the imported tables their names (effectively replacing the existing tables with the imported ones), and that solved the problem.

    Anyone help please! I cannot assign categories or install updates for themes. Get message

    Fatal error: Call to undefined function mbstring_binary_safe_encoding() in /websites/123reg/LinuxPackage21/wh/at/gr/whatgrabsyou.co.uk/public_html/wordpress/wp-admin/includes/class-wp-filesystem-direct.php on line 62

    Can anyone help me in a non technical way? My site is, http://www.whatgrabsyou.co.uk

    esmi

    @esmi

    Forum Moderator

    @chuchunochichi: If you require assistance then, as per the Forum Welcome, please post your own topic.

    How do I post my own topic? Many thanks…..

    esmi

    @esmi

    Forum Moderator

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Unable to assign posts to categories or delete categories’ is closed to new replies.
Skip to toolbar