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.

Update errors 2.1.4 to 2.2.1

July 08, 2011 6:56pm

Subscribe [7]
  • #1 / Jul 08, 2011 6:56pm

    Adam Stoddard

    27 posts

    I’m updating a site and getting these errors at the beginning of the process:

    Undefined variable: DB, Trying to get property of non-object, Duplicate column name 'can_search'

    These are all occurring in ud_009.php.  I tried changing the app version in the config file as mentioned in some other threads, but the errors are the same no matter what. Any thoughts?

  • #2 / Jul 11, 2011 7:09am

    John Henry Donovan

    12339 posts

    Adam,

    What was the version in your config file before you changed it?
    Can you verify that your /system/expressionengine/config.php file is set to 666 permissions as well.

    Do you have any third-party add-ons?

  • #3 / Jul 11, 2011 8:57pm

    Adam Stoddard

    27 posts

    Sorry, it was actually 2.1.4, not 2.1.3 as I had stated.  The config file was and is writeable for sure, as one of the problems was that the update was completely wiping out its contents.

    I had seen the other threads in the forum regarding similar issues and the version number.  I tried running the update from a fresh DB restore with a couple different version numbers just to see if it had any effect and the same errors were produced each time.

    It’s a multi-lingal e-commerce site, so there is a laundry list of third party add-ons. Matrix, Playa, Wygwam, Low Variables, Cartthrob, a multilingual module, Nav-EE, plus more.

  • #4 / Jul 12, 2011 9:03pm

    Lisa Wess

    20502 posts

    Hi, Adam,

    I am sorry you are running into this.  Have you seen this wiki entry on troubleshooting upgrade errors?  That may help you get up and running.

    You’ll also need to ensure your add-ons are all totally up-to-date.

    Let us know if that helps?

  • #5 / Jul 13, 2011 11:26pm

    Adam Stoddard

    27 posts

    I have read that wiki entry, yes.  I came across this thread as well, which is the exact set of errors that I’m seeing: http://ellislab.com/forums/viewthread/193806/

    I tried removing literally every single third party extension / module / fieldtype / accessory as a test to see if it had any effect.  Unlike the poster in the thread I linked to, I’m still getting the same exact errors.  Frustrating to say the least.  I’ve sunk way too many hours at this point into something that should be a 30 minute process.

  • #6 / Jul 14, 2011 3:14am

    Michael Hahn

    316 posts

    Guys I’m getting the same error set during my upgrade (from 1.7.1 to 2.2.1) it made it to the Public Beta pb01 process then produced the same error as leeaston posted here: http://ellislab.com/forums/viewthread/193806/

    I tried deleting the column and ran the update again, it just added it back and produced a similar error:
    ALTER TABLE exp_member_groups ADD COLUMN search_flood_control mediumint(5) unsigned NOT NULL

    EDIT: Ran it again and now its back to the original error

    A PHP Error was encountered
    
    Severity: Notice
    
    Message: Undefined variable: DB
    
    Filename: updates/ud_009.php
    
    Line Number: 40
    
    A PHP Error was encountered
    
    Severity: Notice
    
    Message: Trying to get property of non-object
    
    Filename: updates/ud_009.php
    
    Line Number: 40
    
    A Database Error Occurred
    Error Number: 1060
    
    Duplicate column name 'can_search'
    
    ALTER TABLE exp_member_groups ADD COLUMN can_search char(1) NOT NULL default 'n'
    
    Filename: updates/ud_009.php
    
    Line Number: 112


    Deleting my database in full is not an option as suggested in your wiki.  And I need a fix for this in the next few hours. There is a problem in your upgrade scripts regarding this process.

  • #7 / Jul 14, 2011 3:25am

    Michael Hahn

    316 posts

    FYI: As John asked, my config file is set to 666 but the app version is set to “0”

  • #8 / Jul 14, 2011 4:02am

    Michael Hahn

    316 posts

    OK, heres an update:

    Reset my backed up database and ran the installer again, this time it ran straight through without errors and I am able to login without problems. NO other changes were made.

    Safari, OS X, EngineHosting: FWIW

    Not sure why it balked the first time around.

  • #9 / Jul 14, 2011 12:30pm

    Lisa Wess

    20502 posts

    Glad you’re up and running, Michael!

    Adam, did you try running the update without Javascript on? And can you let us know what browser you’re trying it in?  We may need to have a look but I want to get a bigger diagnostic picture.  Those are the things that we would try if we went in, so it would be worth a try at the update without JS on and in something like Safari, as well - or at least with add-ons like Firebug disabled.

  • #10 / Jul 14, 2011 3:36pm

    Derek Hogue

    316 posts

    I just ran into this exact same issue, and eventually found the culprit - this one line in my config.php:

    $conf['daylight_savings'] = (date('I') == 1) ? 'y' : 'n';

    With that line in, the upgrader was blanking my config.php and replacing it with just this line:

    $conf['app_version'] = '0';

    Hence, it was trying to run every upgrade script from the very beginning of EE.

    Removing that one ‘daylight_savings’ line fixed it.  I had other custom config variables in there as well, they didn’t pose any problems.

    Hopefully that can fix this issue for others as well?

    EDIT: and perhaps, if this can be replicated, it should be filed as a bug?

  • #11 / Jul 15, 2011 2:26pm

    Kevin Smith

    4784 posts

    Thanks for the insight, D-Rock. I’ve added your solution to the wiki page for troubleshooting upgrade issues.

    We’re keeping a close eye on things that cause the upgrade wizard to fail, so while this might be more of an edge case, I still submitted it as a bug so that our dev team knows about it. If we can get the upgrade wizard to work around it, that will be all the better.

    Adam, any update?

  • #12 / Jul 21, 2011 12:16am

    Adam Stoddard

    27 posts

    Odd, for some reason I stopped getting email about updates to this thread.

    I have tried both Firefox and Safari with and without javascript disabled to no effect.
    I didn’t have this custom config value present, but I went ahead and pulled out any custom config values.  No dice unfortunately. 

    I have since tried updating another site on the same server and am getting the exact same errors. I’ve updated a third on EngineHosting and had zero issues.  Potentially something with the server configuration that isn’t playing nice?

  • #13 / Jul 22, 2011 2:58pm

    Sue Crocker

    26054 posts

    Hi, Adam. The two servers with the problem, were they also on EngineHosting or are they on another host?

  • #14 / Jul 22, 2011 5:06pm

    Adam Stoddard

    27 posts

    Both of the sites are on the same server; a local machine running Mac OS X Server.  That why I started considering the possibility that it might be server related.

    The server in question did not have the “date.timezone” specified in the php.ini which is now a requirement for the new version.  Seeing as Mr. Hogue’s issue was time based, I enabled that on the server and tried the upgrade process again, but it’s still throwing the same errors.

  • #15 / Jul 26, 2011 2:47pm

    Brandon Jones

    5500 posts

    Adam, please check your email shortly.

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

ExpressionEngine News!

#eecms, #events, #releases