ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Urgent: Problem updating from EE 2.1.1 to 2.5.3

September 20, 2012 1:06pm

Subscribe [2]
  • #1 / Sep 20, 2012 1:06pm

    agregat

    26 posts

    When updating from EE 2.1.1 to 2.5.3 (using FF 15.0.1) I get the following error:

    A Database Error Occurred

    Error Number: 1060

    Duplicate column name ‘show_sidebar’

    ALTER TABLE exp_members ADD show_sidebar char(1) NOT NULL default ‘y’ AFTER quick_tabs

    Filename: updates/ud_212.php

    Line Number: 53

    This has been encountered by others, and I followed their suggestions and commented out this instruction in updates/ud_212.php (actually line 37).

    I cleared and then restored the database and re-ran the installation.

    This time it got as far as the following:

    A Database Error Occurred

    Error Number: 1054

    Unknown column ‘show_sidebar’ in ‘exp_members’

    ALTER TABLE exp_members ALTER COLUMN show_sidebar SET DEFAULT ‘n’

    Filename: updates/ud_220.php

    Line Number: 217

    What do I do now?

    Frankly I find it amazing that a problem that has been encountered so frequently has not been dealt with and solved. It is fairly normal procedure to only update occasionally (given the frequency of your updates).

    It is also frustrating that in all the many instances in this forum in which people have encountered this problem nobody from Ellis Labs has seen fit to provide an explanation…

    Others who have suffered the same fate:
    http://ellislab.com/forums/viewthread/222862/
    http://ellislab.com/forums/viewthread/222600/
    http://ellislab.com/forums/viewthread/202108/
    http://ellislab.com/forums/viewthread/194783/

    regards

    Chris

     

     

  • #2 / Sep 24, 2012 1:36am

    Kevin Smith

    4784 posts

    Hi Chris,

    I hate that you’ve run into this. Be on the lookout from me, and I’ll make sure you get taken care of.

  • #3 / Sep 25, 2012 8:50am

    Kevin Smith

    4784 posts

    Hey Chris,

    Just wanted to check in to see if you got my email. Let me know if you need me to send it again.

  • #4 / Sep 26, 2012 6:08am

    marijn1412

    13 posts

    I’m having the same problem. Just tried upgrading from 2.1.1 to 2.5.3 and got stuck with the same error.

    Any help is greatly appreciated!

  • #5 / Sep 26, 2012 6:54am

    marijn1412

    13 posts

    After commenting out about 30 lines in update files 212, 215 en 220, I finally managed to complete the upgrade, but I got into new errors:
    - site only shows error template
    - I get database errors when trying to edit entries

    So changing back to old version now… Hope this gets resolved soon!

  • #6 / Sep 27, 2012 11:44am

    Kevin Smith

    4784 posts

    marijn1412,

    Just to be sure before we start troubleshooting this, when you changed back to the old version, did you completely wipe your database before restoring the backup? If not, we’ll likely run into more issues as we work to resolve the ones you’ve already had. I’d suggest making sure you’re very familiar with this wiki article on troubleshooting upgrades.

    Are you running your site on a single server with a single database?

  • #7 / Sep 27, 2012 5:35pm

    marijn1412

    13 posts

    Hi Kevin,

    Thanks for replying. I have cleared the database after restoring the backup, but after reading the troubleshooting wiki I remembered that a year ago I also tried to do an upgrade (I believe to 2.2.0). I ran into some trouble then as well and quickly restored to 2.1.1, but I may have forgotten to clear the database then… that would explain the mysql errors I received while upgrading.

    Question I have now is how do I know what tables in the database (that were probably added by the 2.2.0 upgrade) I have to remove, to make sure the upgrade to 2.5.3 runs smoothly?

  • #8 / Sep 28, 2012 1:57pm

    Kevin Smith

    4784 posts

    Yep, sounds like there would be some artifacts left from that upgrade a year ago. Here’s the way to handle that, but first, some background:

    When EE updates, it’s running through each update file in order, and those update files can be found at /system/installer/updates/. They look like ud_231.php, where 231 is the version number that’s being updated. When EE finishes running through the routines in that update file, the database will effectively be at version 2.3.1. Does that make sense?

    If an update fails and you immediately reload the updater and run it again, it will not re-run any update file that has already been completed, but it will re-run an update file that has been started and didn’t complete. Now, what you want to do here is run the updater like normal from 2.1.1. When you encounter a PHP or MySQL error that says it can’t add/remove/modify/database because it does/doesn’t exist (as the case may be), read what’s happening in that error and then go find the update routine that caused it. At this point, it’s a good idea to see what change the updater was trying to make and then go examine your database to see if that change has already been made. If it has, you comment out that part of the updater file, knowing it can skip that part since the change it wants to make has already been made.

    Remember that re-running the updater at this point will start over at the beginning of the update file in which you experienced the error, so you’ll want to comment out of that update file the part that caused the error as well as any routines that came before it in that particular update file. Then go back and re-run the updater. You may need to do this a few times if there are a few spots in your database that had already been updated and cause an error this time around.

    I know that’s a lot, but does that all make sense?

  • #9 / Oct 01, 2012 6:31am

    marijn1412

    13 posts

    Thanks for explaining Kevin, makes sense now!

  • #10 / Oct 02, 2012 9:47am

    Dan Decker

    7338 posts

    Hi marijn1412,

    I’m glad Kevin’s explanation was helpful for you. Were you able to use it to finish the update?

    Is there anything else I can assist you with?

    Cheers,

  • #11 / Oct 02, 2012 11:57am

    marijn1412

    13 posts

    Hi Dan, the update went well and I’m running 2.5.3 now. Thanks both for helping out!

  • #12 / Oct 03, 2012 3:21pm

    Dan Decker

    7338 posts

    marijn1412,

    Excellent!

    If you need anything else, just let us know.

    ~

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases