XF 2.0 User upgrade problem

Russ

Well-known member
Getting this on a 1.5 -> 2.0.6 upgrade, can't create any user upgrades:
Code:
XF\Db\Exception: MySQL query error [1364]: Field 'redirect' doesn't have a default value in src/XF/Db/AbstractStatement.php at line 212
[LIST=1]
[*]XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
[*]XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 77
[*]XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 79
[*]XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 160
[*]XF\Db\AbstractAdapter->insert() in src/XF/Mvc/Entity/Entity.php at line 1389
[*]XF\Mvc\Entity\Entity->_saveToSource() in src/XF/Mvc/Entity/Entity.php at line 1121
[*]XF\Mvc\Entity\Entity->save() in src/XF/Mvc/FormAction.php at line 69
[*]XF\Mvc\FormAction->XF\Mvc\{closure}() in src/XF/Mvc/FormAction.php at line 159
[*]XF\Mvc\FormAction->run() in src/XF/Admin/Controller/UserUpgrade.php at line 113
[*]XF\Admin\Controller\UserUpgrade->actionSave() in src/XF/Mvc/Dispatcher.php at line 249
[*]XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
[*]XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
[*]XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1931
[*]XF\App->run() in src/XF.php at line 328
[*]XF::runApp() in admin.php at line 13
[/LIST]
Any thoughts?
 
redirect isn't a field that we have in any of the related tables.

My suspicion is that it was added by an add-on which is now either disabled or removed and it relied on its add-on being enabled to set a default value on new records.

If you can track down where it came from, let the author know and see if they can help you fix it. Otherwise you'll need to alter the table to either remove the column or set a default value.
 
redirect isn't a field that we have in any of the related tables.

My suspicion is that it was added by an add-on which is now either disabled or removed and it relied on its add-on being enabled to set a default value on new records.

If you can track down where it came from, let the author know and see if they can help you fix it. Otherwise you'll need to alter the table to either remove the column or set a default value.

Looks like it's giving the same error on our 1.5 board, didn't test that portion out. Thanks, Chris I'll start hunting!
 
I guess we installed Waindigo's old plugin: https://xenforo.com/community/resources/th-user-upgrades.4814/ years ago which left 2 additional columns in there. Deleted them and it appears to be working.

table: xf_user_upgrade
name: agreement // redirect

Just in case anyone else runs into a similar problem...

Curious, how old of a version was it? Even before we got his add-ons his installer kept track of all columns that were created and automatically removed them on uninstall without having to have a separate uninstall script, I'm not 100% sure when he added this, but I don't think this should've happened on any version released after 2015 or so
 
Curious, how old of a version was it? Even before we got his add-ons his installer kept track of all columns that were created and automatically removed them on uninstall without having to have a separate uninstall script

We haven't used user upgrades for almost 5 years now, I'm guessing we installed the add-on back then, not entirely sure when it was uninstalled. I don't even remember using it, to be honest.
 
Back
Top Bottom