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

XF 1.1 When Saving User Upgrade

Discussion in 'Troubleshooting and Problems' started by Yoshi910, Oct 22, 2012.

  1. Yoshi910

    Yoshi910 Member

    When I try to create a user upgrade, it shows this error message:
    Server Error
    Mysqli statement execute error : Field 'redirect' doesn't have a default value
    Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 317
    Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
    Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
    Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1591
    XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1580
    XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1381
    XenForo_DataWriter->save() in XenForo/ControllerAdmin/UserUpgrade.php at line 130
    XenForo_ControllerAdmin_UserUpgrade->actionSave() in XenForo/FrontController.php at line 310
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    XenForo_FrontController->run() in /home/yoshi910/public_html/admin.php at line 13
  2. Chris D

    Chris D XenForo Developer Staff Member

    Have you recently disabled or uninstalled any add ons?

    Basically this error is saying there is a column in a database table called redirect that doesn't have a default value and no value has been specified.

    No value has been specified either because you didn't enter one or there is nowhere to enter that value. The latter could be true if, as I said above, an add on has been disabled or removed.
    Jake Bunce likes this.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yep. It appears as though the xf_user_upgrade table has an extra field called redirect. Uninstall the addon that added that field or edit the definition of that field to specify a default value to avoid the error.
  4. Yoshi910

    Yoshi910 Member

    I just uninstalled an addon I recently added, did not solve the problem. Although I did switch hosts, and I used cPanel to import the database which caused a few tables to import with errors.

    Table structure for xf_user_upgrade:
  5. Chris D

    Chris D XenForo Developer Staff Member

    First step is to drop the redirect field.

    It's possible that other columns are also a problem bit that will become evident through other errors.
  6. Dinh Thanh

    Dinh Thanh Well-Known Member

    This issue was caused by Advanced User Upgrade addon.

    Go to xf_user_upgrade table, change redirect & agreement fields to accept NULL value to fix.
    Andy.N, Jake Bunce and Chris D like this.
  7. Andy.N

    Andy.N Well-Known Member

    I removed that addon long time ago and it does not remove those 2 fields.

Share This Page