• 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

MattW

Well-known member
#1
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
 

Mike

XenForo developer
Staff member
#2
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

Well-known member
#3
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.
Yep, it's missing. Looks like they have corrupt backups as well.

xf_admin.PNG
 

MattW

Well-known member
#4
I've dropped that table, and imported from my own local version, using the same user_id as the administrator.
 

borbole

Well-known member
#5
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

Well-known member
#6
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)
Just did that before your reply (y)
 

borbole

Well-known member
#9
;)
I wish the host did though! They have since restored the database to a previously corrupt version, as per this thread: http://xenforo.com/community/threads/xf_node-empty.60525/

Going round in circles with them.
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.
 

MattW

Well-known member
#10
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.
Same here, I have two separate off site backups of the databases done each night, plus R1Soft doing 4 x daily full VPS backups.
 

MattW

Well-known member
#11
Everything has been OK since yesterday. The host quickly restored to the previously good backup available, and the update went through OK.