XF 2.2 Error trying to install default theme

Ferdinand

Well-known member
When trying to reinstall the default theme I am getting the following error:
XF\Db\Exception: MySQL query error [1364]: Field 'th_iau_profile_id' doesn't have a default value in src/XF/Db/AbstractStatement.php at line 230
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 198
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 79
  3. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 220
  5. XF\Db\AbstractAdapter->insert() in src/XF/Mvc/Entity/Entity.php at line 1521
  6. XF\Mvc\Entity\Entity->_saveToSource() in src/XF/Mvc/Entity/Entity.php at line 1253
  7. XF\Mvc\Entity\Entity->save() in src/XF/Mvc/FormAction.php at line 71
  8. XF\Mvc\FormAction->XF\Mvc\{closure}() in src/XF/Mvc/FormAction.php at line 189
  9. XF\Mvc\FormAction->run() in src/XF/Admin/Controller/Style.php at line 79
  10. XF\Admin\Controller\Style->actionSave() in src/XF/Mvc/Dispatcher.php at line 352
  11. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
  12. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
  13. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
  14. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2487
  15. XF\App->run() in src/XF.php at line 524
  16. XF::runApp() in admin.php at line 13
 
It looks like you have used Install & Upgrade for some time (installed pre-October 2020) as these columns currently set a default value but didn't when the addon was first released.

SQL:
ALTER TABLE `xf_style` CHANGE `th_iau_profile_id` `th_iau_profile_id` INT(10)  UNSIGNED  NOT NULL  DEFAULT 0;

This SQL query should set the default value for you.
 
It looks like you have used Install & Upgrade for some time (installed pre-October 2020) as these columns currently set a default value but didn't when the addon was first released.

SQL:
ALTER TABLE `xf_style` CHANGE `th_iau_profile_id` `th_iau_profile_id` INT(10)  UNSIGNED  NOT NULL  DEFAULT 0;

This SQL query should set the default value for you.
Thank you. I am now getting the same issue with the product ID then th_iau_current_version. I kept making SQL queries but I've had to uninstall install & upgrade addon.

However when installing a new blank style it now just shows as a white page?
 
However when installing a new blank style it now just shows as a white page?
If your site... sometimes I've found if you examine the source of that page it may show an error (frequently noticed this when it was a mySQL authentication issue, the error doesn't show as visible, only in the page source).
It's always worth checking if that happens.
 
Top Bottom