XF 1.4 Mysql error when upgrading to 1.4.2 from 1.3.4

rah350z

Member
Getting this error when upgrading. I've tried to redownload the 1.4.2 upgrade package like 3 times and also re-uploading and overwriting the files several times.
I've also tried putting this
Code:
$config['checkVersion'] = false;
into the config.php to be able to get into control panel and disable all addons, but still not working. Any help would be much appreciated.

Server Error
Mysqli prepare error: Table 'wristhax_forum.xf_user_title_ladder' doesn't exist

  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in XenForo/Model.php at line 219
  5. XenForo_Model->fetchAllKeyed() in XenForo/Model/UserTitleLadder.php at line 16
  6. XenForo_Model_UserTitleLadder->getUserTitleLadder() in XenForo/Model/UserTitleLadder.php at line 114
  7. XenForo_Model_UserTitleLadder->rebuildUserTitleLadderCache() in XenForo/Deferred/ImportMasterData.php at line 42
  8. XenForo_Deferred_ImportMasterData->execute() in XenForo/Deferred/Atomic.php at line 66
  9. XenForo_Deferred_Atomic->execute() in XenForo/Model/Deferred.php at line 256
  10. XenForo_Model_Deferred->runDeferred() in XenForo/Model/Deferred.php at line 390
  11. XenForo_Model_Deferred->_runInternal() in XenForo/Model/Deferred.php at line 316
  12. XenForo_Model_Deferred->runByUniqueKey() in XenForo/Install/Controller/Abstract.php at line 34
  13. XenForo_Install_Controller_Abstract->_manualDeferredRunner() in XenForo/Install/Controller/Upgrade.php at line 221
  14. XenForo_Install_Controller_Upgrade->actionRunDeferred() in XenForo/FrontController.php at line 347
  15. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  16. XenForo_FrontController->run() in /home/wristhax/public_html/install/index.php at line 18

This is the list of addons i have.

Advanced Application Forms 1.1.6
Display Staff Members 1.1.2
Donation Manager 1.2.0
Force Thread Read 1.0
Nodes As Tabs 1.2.2
Reset Password From ACP 1.0
Steam Auth 1.4.4
TaigaChat Pro 1.3.0
Tapatalk 2.3.3
[h] ShowMods 1.1b
[RT] User Rank Ribbons (15) 2.3.5
 
Well the question is if xf_user_title_ladder exists or not. You would need to look in the database through a tool such as phpMyAdmin. If not it will need to be recreated. But is saying it doesn't exist I am willing to be it doesn't.

I hope you also have a database backup from just before this upgrade. The contents of that table shouldn't be important and just running the query to recreate it should suffice if its the only one.
 
If the table is missing running this SQL should recreate it:
Code:
CREATE TABLE `xf_user_title_ladder` (
`minimum_level` int(10) unsigned NOT NULL,
`title` varchar(250) NOT NULL,
PRIMARY KEY (`minimum_level`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

If other tables are missing I would refer to a backup first.
 
I don't see xf_user_title ladder in phpmyadmin or in any previous backups of my db in the past 3 days. Do you think just manually adding that table will fix it?
 
I don't see xf_user_title ladder in phpmyadmin or in any previous backups of my db in the past 3 days. Do you think just manually adding that table will fix it?

If that is the only missing table then yes that should take care of it. Select the database and click on the SQL tab and run the above.
 
After a few moments i've reached the end of it and get this.
Upgrade Errors
Uh oh, your upgrade to 1.4.2 has failed!

The following elements of the database are incorrect:

  • Column xf_poll.max_votes missing.
  • Column xf_poll.change_vote missing.
  • Column xf_poll.view_results_unvoted missing.
  • Column xf_forum.moderate_threads missing.
  • Column xf_forum.moderate_replies missing.
  • Column xf_forum.allow_poll missing.
  • Column xf_forum.list_date_limit_days missing.
  • Column xf_user.activity_visible missing.
  • Column xf_user_profile.password_date missing.
  • Column xf_bb_code.allow_empty missing.
  • Table xf_help_page missing.
This is likely caused by an add-on conflict. You may need to restore a backup, remove the offending add-on data from the database, and retry the upgrade. Contact support if you are not sure how to proceed.
 
The "xf_user_title_ladder" table is created during the upgrade to 1.4. After uploading the files you visit /install to run the upgrade which will create that table.

If for some reason that step was missed then you can run these queries to manually create that table:

Code:
RENAME TABLE xf_trophy_user_title TO xf_user_title_ladder;

ALTER TABLE xf_user_title_ladder CHANGE minimum_points minimum_level INT UNSIGNED NOT NULL;

These queries come from the upgrade script.

Though this manual fix might not completely repair what might be a bad upgrade. If you continue to have problems then it might be a good idea to submit a ticket so we can more closely examine your database:

https://xenforo.com/customers/
 
Thanks Jake for coming in with that. But yeah it looks like he is having more problems than that.

I would revert to the backup and try again. Submit a ticket if it doesn't go again. Thats depending on if you want to try from the backup.
 
I've managed to fix it. Thanks for the help. Found the sql changes that were supposed to be ran in library/XenForo/Install folders and manually ran them in phpmyadmin. Did a rebuild master data after that and everything seems to be working perfectly.
 
Top Bottom