WordPress.org

Ready to get started?Download WordPress

Forums

Upgrade caused loss of Categories (69 posts)

  1. wingpeople
    Member
    Posted 6 years ago #

    I just upgraded to ver. 2.3.2, and all my Categories have disappeared. When I go to Manage | Categories, I see this error message:

    Fatal error: Call to undefined function: _get_category_hierarchy() in /home/content/..../FreeBlog/wp-admin/admin-functions.php on line 780

    I assume I've missed copying something from the install to my site, or overwrote something I shouldn't have. Any ideas of what to do next?

  2. David Borrink
    Member
    Posted 6 years ago #

    I had the same problem yesterday, upgrading from 2.2.2 to 2.3.2. Saw the same error message. I re-installed the files again and double-checked. No categories.

    Others on these board have the same problem. Aparently the database contains the categories, but 2.3.2 is not accessing them. I've got questions up in other posts and will bookmark this one, too so I can keep up on any other discussion with you.

    I hope we can get an answer.

  3. oschene
    Member
    Posted 6 years ago #

    My categories are gone from the category manager, since the upgrade to 2.3.2, and the tags aren't working either. The tables are still there and in the editor, I can still see the categories. I can still add tags in the editor, but the links just go to a 404 page.

    I have repaired and optimized and fiddled with the permalink structure. Nothing seems to fix this. Is there a patch?

  4. Gregg Banse
    Member
    Posted 6 years ago #

    Has anyone submitted a bug report for this issue or is the team aware of it already?

  5. oschene
    Member
    Posted 6 years ago #

    My issue has been resolved with an adjustment to the php configuration on the host's servers. Don't know what, exactly.

  6. Gregg Banse
    Member
    Posted 6 years ago #

    Would you mind asking? My blog is dead in the water at this moment without categories. TIA

  7. MichaelH
    Member
    Posted 6 years ago #

    I've seen the problem reported but no one has duplicated that I know of. Are you sure you deactivated all plugins before attempting the upgrade?

    @DavidBorrink -- if you leave a email or contact link, and you have a 2.2.2 backup of your database, I will do the upgrade for you to 'experience' the problem.

  8. Gregg Banse
    Member
    Posted 6 years ago #

    I have no plugins. The only thing I've added is a template (Networker) and I tried switching to the WP Classic but the issue still exists.

    I should add that I don't get an error like the OP. I can see the cats in the db but they don't show in Public or Admin.

  9. justinratwebtek
    Member
    Posted 6 years ago #

    I've been attempting to replicate this as well today and can't. I did do it once, but it was completely due to User Permissions (See here for a 2.1.x Category upgrade experience.) setup as SELECT, INSERT, UPDATE, DELETE

    I've gone from a 2.1.2 backup directly to a 2.3.2 on two machines, several times, without a hiccup other than when I purposely messed with Permissions.

  10. Gregg Banse
    Member
    Posted 6 years ago #

    Tried giving the user full permissions and still no cats. Thanks anyhow.

  11. justinratwebtek
    Member
    Posted 6 years ago #

    I just went from my 2.1.2 backup to the whole 2.x line up to 2.3.2 and I couldn't replicate anything other than Q'd posts not showing up after an update. All my Cats where the same after each upgrade.

    Now, I am removing all files but the wp-config.php and copying over all new files (no overwriting). I don't have time to try overwriting each one of the installs to see if there is an extra file somewhere that causes the hiccup though... If I have time, I'll be back later to see if we can replicate it.

  12. Gregg Banse
    Member
    Posted 6 years ago #

    FYI - I put my old files back on the server (v2.3.1) and I have both my categories and blogroll back. Guess I'll run it this way and attempt a hand edit of the upgrade affected files later.

  13. David Borrink
    Member
    Posted 6 years ago #

    Michael,

    I thought it was 2.2.2 but it's 2.2.1 that I upgraded from.

    I think there's a possibility that I didn't have the plugins deactivated. I know that's "procedure", too.

    I can't quite recall my steps to stop the installation, deactivate the plugin, and I may have replaced the overwritten parts with 2.2.1's originals, did the plugin deactivation, then went back and did the install of 2.3.2. I'm just not 100% sure.

    Is there a file that perhaps needs a tweak to accept the categories that are clearly listed in the current database? I can't add any categories right now, so I would think that perhaps there's a "hack" to a certain php file that might allow the categories back, and then 2.3.3 could re-adjust the database on it's install and work properly with standards files?

    My wife has posted a lot in the last few days and can't go back to her 2.2.1 database now.

    My email is [moderated] if you want to contact me.

  14. MichaelH
    Member
    Posted 6 years ago #

    DavidBorrink sent me his 2.2.1 database and I installed on my local machine and was able to upgrade to 2.3.2 successfully with all categories intact.

    Talked with David, and we forced a database upgrade by setting his db_version value in wp_options back to 5183 and did the wp-admin/upgrade.php step. It worked and all his categories were there.

  15. David Borrink
    Member
    Posted 6 years ago #

    Thank you, Michael!
    I was going to write up a comment to explain the procedure in order to help the others on the board here, but you've already pointed to the db_version listing.

    People, this can be done by backing up your database in order to perform a little surgery on the active database by accessing phpAdmin on your hosting server. Turn off your plugins in WP in preparation to do a forced upgrade.

    In a separate browser tab or window, go to your hosting's phpAdmin, locate wp_options in the left column (and if you have wp_categories in the listing, that's proof you need to do this; that table should be replaced by a few new tables). Choose Browse, locate db_version in the "option_name" column. If you see the value as 6124, you need to edit it using the edit icon to the left. Change the number to match the db_version number from your previous version (see Michael's link directly above) and save your change.

    Now, go back to the tab/window of your WP site and after the main URL of your blog add "/wp-admin/upgrade.php" and you'll be presented with an upgrade window. WordPress is saying, "hey, your database is not a 2.3.2 version, we need to upgrade". WP sees the old number in the database and goes into upgrade mode. Click to upgrade and this should change your categories to the new terms, tags, etc. that 2.3.2 needs to access.

    If successful, then activate your plugins again and breathe a sigh of relief. Your categories are back!

    That's how we did it.

  16. MichaelH
    Member
    Posted 6 years ago #

    Just an interesting point about David's first, failed, upgrade. The wp_categories table was still in his database, there were no terms tables (normally there would be 3 such tables), and he was able to Write Posts after the upgrade. The bottom of his admin panels showed 2.3.2 as the version, and the 'db_version' in his 'wp_options' table was 6124 (which is the value from a 2.3.2 upgrade).

  17. justinratwebtek
    Member
    Posted 6 years ago #

    Michael,

    What you're describing is what happened to me when I forced a permissions downgrade on the DB user. Hmm.

  18. Gregg Banse
    Member
    Posted 6 years ago #

    Just a clarification request re: plugins. I did realize that I had forgotten I had Askimet installed. Should this be deactivated prior to upgrade or removed altogether?

    RE: database. My issue seems to be code related only. The info is still there in the db. The fact that it is independent of the theme (I switched between my chosen theme and the WP default and had the same issue) places the issue with the WP core code. This upgrade issue is an interesting possibility. My db indicates it's all set (6124). The only thing I can think of that may have been an anomaly is the plugin.

  19. David Borrink
    Member
    Posted 6 years ago #

    Lorax,

    Any time you do an upgrade you need to have all plugins turned off. I would think that by following the instructions above, your database will get upgraded properly.

  20. MichaelH
    Member
    Posted 6 years ago #

    @lorax. Yes deactivate ALL plugins. They don't necessarily need to be deleted after deactivating, but you do need to make sure you have up-to-date versions of each plugin.

    If you have the wp_categories table, that mean the database upgrade really didn't WORK. Try the avenue suggested above by DavidB to force the database upgrade.

    Oops, see David's got it covered ;)

  21. Gregg Banse
    Member
    Posted 6 years ago #

    Thanks guys. Will try by weeks end and report back.

  22. Gregg Banse
    Member
    Posted 6 years ago #

    Hmmm... well I deactivated the Plugins and then uploaded the update and darn.... lost my categories and blogroll again!! This is very annoying since I seem to be the only one who experiences the issue.

    Where to go from here?

  23. MichaelH
    Member
    Posted 6 years ago #

    Post your email here and I'll contact you for a backup of your database and I'll do an upgrade from whatever version you are at, to 2.3.2, to see what the hecks the issue!

    I'll moderate your email when I see it...

  24. Gregg Banse
    Member
    Posted 6 years ago #

    [moderated email address-Email sent to lorax]

  25. Gregg Banse
    Member
    Posted 6 years ago #

    Aaaaaaaaaaaaaaaaaaaaaagh..... found it. Michael, you're not going to believe this - but actually you will.

    The whole issue had to do with two lines of code that I SHOULDN'T have left alone.

    wp-config.php
    
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');

    Removed these and I got my categories and blog-roll back. Note to self (and anyone else who reads this). Do NOT use the famous 5 Minute install/upgrade as your guide for upgrading. Read actual installation instructions. They say quite clearly to remove these lines (unless you really do need them - which most of us don't).

    My apologies.

  26. minusonebit
    Member
    Posted 6 years ago #

    I have upgraded 11 installations this week (about 35 more to go) and I have never removed those from the configs and I have not lost categories, either. I doubt that was the issue, you must have something else going on that caused it to break with the presence of those two lines.

  27. Gregg Banse
    Member
    Posted 6 years ago #

    Well I can't explain it then. Michael and I tried several different things including complete fresh installations, importing the SQL dump files and changing the transfer type. None of which worked. The only thing I did differently was to remove those lines. In fact, I just added them back in and uploaded that file again. Categories and blogroll dissapear. Took them out and uploaded. Everything is back to normal.

    added

    Adding DB_COLLATE and DB_CHARSET to the wp-config.php file, for an existing blog, can cause problems — as Ryan Boren says, "your queries will go boom!"

    http://codex.wordpress.org/Editing_wp-config.php

  28. allyanders
    Member
    Posted 6 years ago #

    My issue is similar. No categories after upgrade to 2.3.2. All posts are now listed as "uncategorized." I can't add them under Manage > Categories. I get this error: Something strange happened. Try refreshing the page.

    When I refresh the page, nothing happens.

    When I try to add a category from the Post page, it immediately shows up, but if I try to add another, it replaces the first one with the new one.

    I haven't looked at the database yet to see if the categories are still in there. I assume they are.

    I just find it strange considering that I've used the exact same version, same plugins, everything to upgrade 5 other wordpress blogs this past week and none of them had this problem.

  29. djspinnet
    Member
    Posted 6 years ago #

    Hi guys, I am having the same problem as well.

    I have deleted all my old 2.2 files and uploaded every single file to 2.3.2 and ran the db upgrade but everything is still a no-go.

    I do not have a backup, but I don't mind losing my categories, I'll just slowly add them back again one by one.

    Problem is, because it gives me the same old "Fatal error: Call to undefined function _get_category_hierarchy() in... " error, I cannot even delete my existing categories or even, for that matter, create new ones to re-add them!

    Could anyone help me out here?

  30. gliv
    Member
    Posted 6 years ago #

    Hi there. Same issue as allyanders mentioned. Categories gone, can't add new ones (besides, that "Error message" is absolutely useless, it adds no information about the problem. Recode maybe?).
    I'm rather concerned about the fact that I no longer can add categories. This means there's something not working the way it should, even though it messed up the old categories.
    Btw. is there some scheme or list with which one could compare DB-Structure roughly to figure out if it's been 'tweaked' correctly by the upgrade process?

    Is anyone addressing this problem or does some guru have a solution at hand? Would be great.

Topic Closed

This topic has been closed to new replies.

About this Topic