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

XF 1.1 Upgrade failing

John

Well-known member
#1
I'm upgrading my localhost install which is running 1.1.3 and the upgrade is failing with this error message:

Mysqli statement execute error : Field 'property_group_id' doesn't have a default value

  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  3. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
  4. Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1591
  5. XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1580
  6. XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1381
  7. XenForo_DataWriter->save() in XenForo/Model/StyleProperty.php at line 2231
  8. XenForo_Model_StyleProperty->importStylePropertiesFromArray() in XenForo/Model/StyleProperty.php at line 2187
  9. XenForo_Model_StyleProperty->importStylePropertyXml() in XenForo/Model/StyleProperty.php at line 2120
  10. XenForo_Model_StyleProperty->importStylePropertyDevelopmentXml() in XenForo/CacheRebuilder/ImportMasterData.php at line 45
  11. XenForo_CacheRebuilder_ImportMasterData->rebuild() in XenForo/ControllerHelper/CacheRebuild.php at line 26
  12. XenForo_ControllerHelper_CacheRebuild->rebuildCache() in XenForo/Install/Controller/Upgrade.php at line 232
  13. XenForo_Install_Controller_Upgrade->actionRebuild() in XenForo/FrontController.php at line 310
  14. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  15. XenForo_FrontController->run() in /Applications/XAMPP/xamppfiles/htdocs/forum/install/index.php at line 18
Thanks for any pointers. :)
 

Chris D

XenForo developer
Staff member
#9
I think there might be more records there than is being shown...

If Brogan is on the right track - and I have no idea what else it could be - then this query might reveal a record without a group_id number:

Code:
SELECT * FROM xf_style_property_group WHERE property_group_id = NULL
Or

Code:
SELECT * FROM xf_style_property_group WHERE property_group_id = ''
Or

Code:
SELECT * FROM xf_style_property_group WHERE property_group_id = 0
 

John

Well-known member
#12
Thanks Chris and Paul, I'll do some more digging. All else fails, I'll wipe the DB and do a clean install...it was just phantom data from an old install that I used simply for convenience.
 

Jake Bunce

XenForo moderator
Staff member
#15
Mysqli statement execute error : Field 'property_group_id' doesn't have a default value
This error would seem to indicate that xf_style_property_group.property_group_id is missing the AUTO_INCREMENT attribute. Did you recently perform any db maintenance such as restoring a backup or changing servers? Corruption may have occurred during such maintenance. If you can revert or reinstall that should fix it.

Or you can try running this query to restore the primary key:

Code:
ALTER TABLE xf_style_property_group CHANGE property_group_id property_group_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY;
Otherwise I can take a look if you give me access.