WordPress.org

Ready to get started?Download WordPress

Forums

Upgrade from 2.1.x -> 2.6 caused category names to blank & "-2-2-2-2-2..." (25 posts)

  1. Anonymous
    Unregistered
    Posted 5 years ago #

    I've just upgraded from 2.1.x to 2.6, and the only issue I've found so far is that although my categories table is gone and replaced with the 3 terms tables, all records in the terms table have no name, and the slugs are:

    [blank]
    -2
    -2-2
    -2-2-2
    -2-2-2-2
    ... and so on.

    help?

  2. Anonymous
    Unregistered
    Posted 5 years ago #

    Bump! This is a big deal, for me!

  3. techlh
    Member
    Posted 5 years ago #

    Same thing happened to me. Looks like I'll be submitting a ticket to my host for a restore of yesterdays sql file

  4. @mercime
    Volunteer Moderator
    Posted 5 years ago #

    hello. Please read the guidelines before upgrading your WordPress installation. I hope you made a back up of your files and database before upgrading. Change design to default theme because the default theme will be upgraded as well.

    Recommend that you upgrade from 2.1 to 2.6 a step at a time. Btw, I assume that having read the install
    1) upgrade from 2.1 to 2.2 then check the posts and files - backup sql and files
    2) upgrade from 2.2. to 2.3 then check the posts and files - backup sql and files
    3) upgrade from 2.3 to 2.5.1 then check posts and files - backup sql and files
    4) upgrade from 2.5.1 to 2.6 then check posts and files - backup sql and files.

    That said, that's the conservative way and it worked for friend's site when I helped her upgrade from 2.2 to 2.6. Slow but sure plus saved me from a lot of stress :-)

    You can get previous WordPress versions at http://wordpress.org/download/release-archive/
    Good luck.

  5. Anonymous
    Unregistered
    Posted 5 years ago #

    Thanks, mercime, I'll give that a shot. It'll be tedious, but worth it, assuming it works.

    I know I made a backup of my database first, so even if I forgot to backup the code, I should just be able to overwrite it with that particular version and be ok. In theory. ;)

    Trip report to follow, as soon as I find time to run through all of that.

  6. mkwick
    Member
    Posted 5 years ago #

    Hmmm, too late I am afraid on my end, I went from 1.5 to 2.6 and I have -2-2-2 things everywhere. I backed up as well but things are toast.

  7. @mercime
    Volunteer Moderator
    Posted 5 years ago #

    If you've backed up files and SQL, then all is not lost. There's still hope :-)

  8. Anonymous
    Unregistered
    Posted 5 years ago #

    So ... for the sake of argument ... what would be the solution to this if you were very bad and had not backed up your database?

  9. Anonymous
    Unregistered
    Posted 5 years ago #

    For the sake of argument? Cry.

  10. @mercime
    Volunteer Moderator
    Posted 5 years ago #

    Solution would be to ask your webhost tech people to retrieve SQL from last week (or before) of the database you were using for WordPress and send to you - that is, assuming that they know what they are doing. Good luck.

  11. Anonymous
    Unregistered
    Posted 5 years ago #

    Trip report:

    I successfully restored my original database backup (made just before my original attempt at upgrading) and the file-system backup. I then went into my wp-admin, deactivated all plugins, and switched to the default theme. (<-- These suggestions should be added to the upgrade documentation)

    I then downloaded all of the major updates since 2.1 (2.2, 2.3, 2.4, ...) skipping the point releases (2.2.1, 2.2.2, ...) from: http://wordpress.org/download/release-archive/ and unzipped each to its own directory.

    I uploaded 2.2, hit /wp-admin/upgrade.php on my site, ran the upgrade, tested my site to make sure posts still showed up in their correct categories, backed up the database (no need to backup files), and repeated the process for 2.3, 2.4, 2.5, and eventually 2.6.

    It was tedious, but at least this way, everything went off without a hitch.

    Of course some of my old plugins aren't compatible, but at least my data is correct, and I can work from here.

  12. @mercime
    Volunteer Moderator
    Posted 5 years ago #

    Hey congratulations atuttle, glad it worked for you! Slow but sure :-) Cheers.

  13. PSSuperstars
    Member
    Posted 5 years ago #

    I'm having this same problem on like 3-4 of my bigger traffic sites.
    I upgraded FINALLY to avoid being hacked.. and this happened. :(
    *cries*

  14. @mercime
    Volunteer Moderator
    Posted 5 years ago #

    Did you backup SQL?

  15. maestro4k
    Member
    Posted 5 years ago #

    I've been seeing this happen to every blog I've upgraded that was a version prior to 2.3 (I don't know if it effects 2.3 or not, I haven't done any 2.3 -> 2.6 upgrades yet.) So far I can confirm that this bug impacts upgrades from 2.1.* and 2.2.* going to 2.6 directly. Whatever is causing this it wasn't in the 2.5 upgrade code as upgrading to 2.5, then to 2.6 keeps the category information intact.

    Just to confirm for those running into this: it's safe to go from 2.1.* and 2.2.* to 2.5, then to upgrade from 2.5 to 2.6.

    I do wish I could find a bug listed about this, I'm not sure the devs realize this bug exists yet or not. :(

  16. whooami
    Member
    Posted 5 years ago #

    buggy sure -- but then again, its a bug thats introduced by people not keeping up with general wordpress housekeeping chores aka upgrading as the upgrades are released. Maybe thats better called penance.

  17. @mercime
    Volunteer Moderator
    Posted 5 years ago #

    Still another successful way for upgrading to 2.6.1 from WP 2.2 install using XML
    1. Back up SQL phpMyAdmin (always)
    2. Export XML file from Admin
    3. Dump DB
    4. Delete 2.2 wp-admin and wp-includes folders. 5. Upload 2.6.1 wp-admin and wp-includes folders, plus 2.6.1 default theme to wp-contents folder, and upload root files with updated wp-config.php
    6. Run install.php
    7. Import XML files - make sure to increase max file upload to XML requirement. Sometimes when file's big e.g. 22MB up, you have to try the import a couple of times or so.
    8. Check posts in default theme. Then add the icing on the cake with theme and plugins :-)
    Good luck.

  18. maestro4k
    Member
    Posted 5 years ago #

    Looks like this has been fixed in 2.6.1, I finally found a ticket for it, #7320. Milestone's set as 2.6.1, so upgrading directly to 2.6.1 should also work. I haven't actually tried this myself yet, but will try to remember to report next time I do an upgrade if it works or not.

  19. @mercime
    Volunteer Moderator
    Posted 5 years ago #

    That's good to know maestro4k. While SQL backup will always be a given, I'm now partial to good clean XML imports from 2.2 to 2.6.1 since previous two upgrades have been a breeze. Simply put, it's like installing WP for the first time but with XML import to a very clean DB devoid of leftover tables from deactivated plugins which might not be compatible with latest WP version. No more going into DB and deleting redundant tables, at least for the moment, I'm lazy that way.

  20. whooami
    Member
    Posted 5 years ago #

    Looks like this has been fixed in 2.6.1

    its not fixed in 2.6.1 -- I upgraded a 2.1.x blog to 2.6.1 just the other night. it didnt work.

    I never have problems with upgrades, and thought I would give it a try.

  21. losangelesinternetmarketing
    Member
    Posted 5 years ago #

    *cries*

    I'm going through Archive.org, and manually pulling out all of my tags. I am then going to go into wordpress and rename all of my tags :(

    Any better suggestions for the guy who didn't backup his wordpress files?

  22. @mercime
    Volunteer Moderator
    Posted 5 years ago #

    I will pray for you. If you don't have a SQL backup, more prayers for you :-(

  23. transmothra
    Member
    Posted 5 years ago #

    If you don't backup your files & database, you're temporarily or permanently screwed. You need to contact your host to have them restore from a tape backup... ASSUMING they 1) backup nightly, weekly, or monthly, and 2) provide that service. My host (hostgator) charges for this service.

    Live and learn! Don't make the same mistake twice.

  24. losangelesinternetmarketing
    Member
    Posted 5 years ago #

    I upgraded - and haven't looked at my site for almost 3 months. They update weekly, so in short... There's nothing to talk about. I was just hoping that there's a way to recover the info from the existing sql database. I mean it knows which articles are in which categories... It's just got the actual tag name as a 0

  25. dumser
    Member
    Posted 5 years ago #

    I recently upgraded a site from 2.2.3 to 2.3 to 2.5.1 to 2.7.1. This is from memory, but I believe running the 2.3 upgrade.php just showed a blank page. Then the 2.5 upgrade complained about WordPress database errors (stuff like "Duplicate entry '1' for key 1") but said it upgraded -- and it created the taxonomy structure although did not create relationships. And the 2.5 upgrade caused a recursion loop when subsequently trying to access the backend. But the 2.7.1 straightened that out, although relationships were still missing.

    So, after a bit of spelunking around in the term tables, I put together the following script:

    #! /bin/sh
    
    awk '/INSERT INTO wp_post2cat/ { print $6 + 0, $7 + 0 }' $1 \
      | sort -n \
      | awk '{ printf \
            "INSERT INTO wp_term_relationships VALUES (%d,%d,0);\n" \
            "UPDATE wp_term_taxonomy SET count = count + 1 WHERE term_id = %d;\n", \
          $1, $2, $2; }'

    Basically, all that was missing was a row in relationships that linked a post (object_id) to a category (term_id). (You also need to bump the count for that term_id.) So if you have a SQL dump from before the upgrade attempt, you can feed it to the above script, save the output to a file and feed that back into mysql.

Topic Closed

This topic has been closed to new replies.

About this Topic