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.

Cannot upgrade v2.1.1 to v2.2.2

October 14, 2011 11:07am

Subscribe [4]
  • #1 / Oct 14, 2011 11:07am

    We have a client site that is running 2.1.1.
    For security reasons we want to update the site to version 2.2.2.
    Additionally we have a plugin that requires a newer version of EE.

    We have followed the directions here: http://ellislab.com/expressionengine/user-guide/installation/update.html

    When we get to the Run Update Wizard part, the process crashes on table updates for tables that apparently do not exist.
    We determined this by reading other forum posts.

    There was a suggestion to incrementally upgrade EE from 2.1.1 to 2.2.2 using each release manually.  Although according to the EE main site, incremental upgrades are not offered.

    We need assistance with this issue.
    If necessary we can attempt to run the update again and we can see the exact tables the update is failing on.

  • #2 / Oct 14, 2011 5:01pm

    Kevin Smith

    4784 posts

    Hi billing,

    At this point, I recommend restoring the site to its pre-upgrade state using the backups you took before proceeding with the backup. Remember to drop all the tables in your database before restoring your DB backup. See this troubleshooting guide for more information on retrying failed upgrades.

    Additionally, I would recommend using the latest version of ExpressionEngine, which at the time of writing is EE 2.3.

    When you re-run the upgrade, as soon as you come to an error, stop immediately and post that error message back here for review.

  • #3 / Oct 26, 2011 12:39pm

    Hi Kevin.

    I followed some instructions online about commenting out tables when the update crashes.

    Here are those results..

    1st Error:

    {"error":"
    Error Number: 1060<\/p>\n\n
    
    Duplicate column name 'show_sidebar'<\/p>\n\n
    
    ALTER TABLE exp_members ADD show_sidebar char(1) NOT NULL default 'y' AFTER quick_tabs<\/p>\n\n
    
    Filename: updates\/ud_212.php<\/p>\n\n
    
    Line Number: 53<\/p>"}

    #Commented out the alter table, re-ran update w/fresh db.


    2nd Error:

    A Database Error Occurred
    Error Number: 1060
    
    Duplicate column name 'batch_location'
    
    ALTER TABLE `exp_upload_prefs` ADD `batch_location` VARCHAR(255)
    
    Filename: updates/ud_215.php
    
    Line Number: 169

    #Commented out the alter table, re-ran update w/fresh db.

    3rd Error:

    * Alter Sidebar state default
      */
     // *E* private function _alter_sidebar_deft()
    // {
    //  $this->EE->db->query("ALTER TABLE exp_members ALTER COLUMN show_sidebar SET DEFAULT 'n'");
    // }
    
    
    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

    #Commented out the alter table, re-ran update w/fresh db.

    4th Error:

    Error Number: 1060
    
    Duplicate column name 'exclude_group'
    
    ALTER TABLE `exp_category_groups` ADD `exclude_group` TINYINT(1) DEFAULT '0' NOT NULL
    
    Filename: updates/ud_215.php
    
    Line Number: 201
    
    
     // *E* private function _do_cat_group_update()
     // {
      // $fields = array(
         // 'exclude_group'  => array(
            // 'type'   => 'TINYINT',
            // 'constraint' => 1,
            // 'null'   => FALSE,
            // 'default'  => 0
            // ));
    
      // $this->EE->dbforge->add_column('category_groups', $fields);  
     // }

    ^—- commented out in ud_215.php

    5th Error:

    Error Number: 1061
    
    Duplicate key name 'last_activity_idx'
    
    CREATE INDEX last_activity_idx on exp_sessions(last_activity)
    
    Filename: updates/ud_220.php
    
    Line Number: 82
    
     // *E* private function _update_session_table()
     // {
      Add an index on last_activity
      // $this->EE->db->query("CREATE INDEX last_activity_idx on exp_sessions(last_activity)");
    
      // $field = array(
       // 'user_agent' => array(
        // 'name'   => 'user_agent',
        // 'type'   => 'VARCHAR',
        // 'constraint' => 120
       // )
      // );
    
      // $this->EE->dbforge->modify_column('sessions', $field);
     // }

    After this I just receive a blank white screen when I roll back and try the update again.

  • #4 / Oct 28, 2011 4:27pm

    Kevin Smith

    4784 posts

    Hi billing,

    I’m sorry this update is causing so much trouble for you. When you restore the DB before trying the upgrade again, are you making sure the database is completely cleared? There should be no tables left in the database before you restore the DB backup. The reason I ask is that you shouldn’t be able to get through the 2.1.5 part of the upgrade without an issue on your 3rd pass and then have an error during that part of the upgrade on your 4th pass. Since that’s happening, it makes me think the database may have some artifacts in it from previous failed updates.

    Try this for me: Clear all the tables from your database. Now restore your database with the backup that you took before any of the updates were tried. Now, take a look at the errors you posted above and compare those errors with your freshly restored database. Does it look like those errors should be happening based on the looks of your database? For example, is there already a show_sidebar column in your exp_members table?

  • #5 / Nov 02, 2011 6:32pm

    Kevin,

    I loaded up a fresh copy of the site files, database and update files.

    I have checked the exp_members table and there isn’t a show_sidebar field in the exp_members table pre-update.

    When I ran the update I received this:

    {"error":"
    Error Number: 1060<\/p>\n\n
    
    Duplicate column name 'show_sidebar'<\/p>\n\n
    
    ALTER TABLE exp_members ADD show_sidebar char(1) NOT NULL default 'y' AFTER quick_tabs<\/p>\n\n
    
    Filename: updates\/ud_212.php<\/p>\n\n
    
    Line Number: 53<\/p>"}

    Is it possible I can give you access to the dev site and perhaps send a copy of the database your way?
    Is there another level/tier of support we can get for this issue?

    Thanks,

    James

  • #6 / Nov 04, 2011 3:11pm

    Kevin Smith

    4784 posts

    Hi James,

    Thanks for the investigation into this. I completely understand the urgency here; while we don’t yet have additional levels of support available, we are working on adding those solutions. In the meantime, however, I can take a first-hand look at the problem. Be on the lookout for an email from me, and I’ll do my best to get you up and moving in a hurry.

  • #7 / Nov 07, 2011 3:38pm

    Dan Decker

    7338 posts

    Hi James,

    I know we are going to be working with you on this through a different channel, but I have a question for you here. Can you share what browser you are using when you attempt the update? I’ve seen reports of this issue being persistent when using Chrome. Thanks for the further bits of information.

    Cheers!

  • #8 / Nov 10, 2011 9:28am

    Sue Crocker

    26054 posts

    Hi, James.

    Just double checking to ensure you got the email from Kevin.. do you still require assistance?

  • #9 / Nov 14, 2011 11:54am

    Kevin Smith

    4784 posts

    Hi James,

    We haven’t heard from you for a few weeks, so I’ll close this thread out. If you still need some help, please feel free to open up a new related thread by clicking on the button below.

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

ExpressionEngine News!

#eecms, #events, #releases