1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 XF 1.2.2 Update Error

Discussion in 'Installation, Upgrade, and Import Support' started by MattW, Sep 30, 2013.

  1. MattW

    MattW Well-Known Member

    Having more issues with a site. Nimbus hosting have had to restore the database from a backup again! They have restored it to a point in time BEFORE I updated the site to XF 1.2.2, and now it's saying I need to run the update again.

    When I try to run the 1.2.2 update, it stalls with the following error:

    Code:
    Server Error
    Server Error
    
    Mysqli prepare error: Unknown column 'user_id' in 'where clause'
    
    Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
    Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
    Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
    Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 632
    Zend_Db_Adapter_Abstract->update() in XenForo/Model/Admin.php at line 324
    XenForo_Model_Admin->rebuildUserAdminPermissionCache() in XenForo/Model/Admin.php at line 446
    XenForo_Model_Admin->importAdminPermissionsAddOnXml() in XenForo/Model/Admin.php at line 403
    XenForo_Model_Admin->importAdminPermissionsDevelopmentXml() in XenForo/Deferred/ImportMasterData.php at line 17
    XenForo_Deferred_ImportMasterData->execute() in XenForo/Deferred/Atomic.php at line 61
    XenForo_Deferred_Atomic->execute() in XenForo/Model/Deferred.php at line 208
    XenForo_Model_Deferred->runDeferred() in XenForo/Model/Deferred.php at line 331
    XenForo_Model_Deferred->_runInternal() in XenForo/Model/Deferred.php at line 265
    XenForo_Model_Deferred->runByUniqueKey() in XenForo/Install/Controller/Abstract.php at line 34
    XenForo_Install_Controller_Abstract->_manualDeferredRunner() in XenForo/Install/Controller/Upgrade.php at line 216
    XenForo_Install_Controller_Upgrade->actionRunDeferred() in XenForo/FrontController.php at line 337
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    XenForo_FrontController->run() in /var/www/vhosts/currentaffairsforum.com/httpdocs/install/index.php at line 18
     
    OverHere likes this.
  2. Mike

    Mike XenForo Developer Staff Member

    The query that's erroring is failing on the xf_admin.user_id column. This is a column that has always existed, so if this is a complete backup, it looks like it might be corrupted. You may want to confirm that this doesn't exist in phpMyAdmin.
     
    MattW likes this.
  3. MattW

    MattW Well-Known Member

    Yep, it's missing. Looks like they have corrupt backups as well.

    xf_admin.PNG
     
  4. MattW

    MattW Well-Known Member

    I've dropped that table, and imported from my own local version, using the same user_id as the administrator.
     
  5. borbole

    borbole Well-Known Member

    Can you try to drop it completely and then recreate it by copy/paste its structure in the SQL box of your phpmyadmin? You can take the structure from the installation folder. (Can't remember off hand the name of the file that has it)
     
    MattW likes this.
  6. MattW

    MattW Well-Known Member

    Just did that before your reply (y)
     
    borbole likes this.
  7. borbole

    borbole Well-Known Member

    Great mind thing a like :D
     
  8. MattW

    MattW Well-Known Member

  9. borbole

    borbole Well-Known Member

    In my early days as a webmaster I have found the hard way to not rely on one's host to make the backups but to make my own and check them anytime that they are made to make sure that they are made properly.
     
    0ptima likes this.
  10. MattW

    MattW Well-Known Member

    Same here, I have two separate off site backups of the databases done each night, plus R1Soft doing 4 x daily full VPS backups.
     
    borbole likes this.
  11. MattW

    MattW Well-Known Member

    Everything has been OK since yesterday. The host quickly restored to the previously good backup available, and the update went through OK.
     

Share This Page