XF 2.0 MSQL Error

gforce

Active member
Team,

I really tried to do as much research as I could (2 days of forums, googling and etc). I went into phpadmin and tried to hunt this down, but cannot find it. I'm use to VB so the learning curb has been quite difficult. Would you have any idea on where to start?


XF\Db\Exception: MySQL query error [1364]: Field 'discord_options' doesn't have a default value in src/XF/Db/AbstractStatement.php at line 212
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 174
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 69
  3. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 74
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 150
  5. XF\Db\AbstractAdapter->insert() in src/XF/Mvc/Entity/Entity.php at line 1381
  6. XF\Mvc\Entity\Entity->_saveToSource() in src/XF/Mvc/Entity/Entity.php at line 1113
  7. XF\Mvc\Entity\Entity->save() in src/XF/Mvc/FormAction.php at line 69
  8. XF\Mvc\FormAction->XF\Mvc\{closure}() in src/XF/Mvc/FormAction.php at line 159
  9. XF\Mvc\FormAction->run() in src/XF/Admin/Controller/AbstractNode.php at line 110
  10. XF\Admin\Controller\AbstractNode->actionSave() in src/XF/Mvc/Dispatcher.php at line 249
  11. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
  12. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
  13. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1880
  14. XF\App->run() in src/XF.php at line 328
  15. XF::runApp() in admin.php at line 13
 
Now getting another error.

XF2.0 seems to be very problematic. unable to install any addon since i have upgraded.

Code:
XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'template_id' in 'field list' in src/XF/Db/AbstractStatement.php at line 212

    XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 174
    XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 36
    XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 46
    XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 74
    XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 106
    XF\Db\AbstractAdapter->fetchAllColumn() in src/XF/Service/Phrase/Compile.php at line 63
    XF\Service\Phrase\Compile->recompileIncludeContent() in src/XF/Entity/Phrase.php at line 161
    XF\Entity\Phrase->_postSave() in src/XF/Mvc/Entity/Entity.php at line 1137
    XF\Mvc\Entity\Entity->save() in src/XF/AddOn/DataType/Phrase.php at line 78
    XF\AddOn\DataType\Phrase->importAddOnData() in src/XF/Job/AddOnData.php at line 108
    XF\Job\AddOnData->run() in src/XF/Job/Manager.php at line 241
    XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 187
    XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 103
    XF\Job\Manager->runByIds() in src/XF/Admin/Controller/Tools.php at line 120
    XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 249
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 89
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1880
    XF\App->run() in src/XF.php at line 328
    XF::runApp() in admin.php at line 13
 
Now getting another error.

XF2.0 seems to be very problematic. unable to install any addon since i have upgraded.

Code:
XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'template_id' in 'field list' in src/XF/Db/AbstractStatement.php at line 212

    XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 174
    XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 36
    XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 46
    XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 74
    XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 106
    XF\Db\AbstractAdapter->fetchAllColumn() in src/XF/Service/Phrase/Compile.php at line 63
    XF\Service\Phrase\Compile->recompileIncludeContent() in src/XF/Entity/Phrase.php at line 161
    XF\Entity\Phrase->_postSave() in src/XF/Mvc/Entity/Entity.php at line 1137
    XF\Mvc\Entity\Entity->save() in src/XF/AddOn/DataType/Phrase.php at line 78
    XF\AddOn\DataType\Phrase->importAddOnData() in src/XF/Job/AddOnData.php at line 108
    XF\Job\AddOnData->run() in src/XF/Job/Manager.php at line 241
    XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 187
    XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 103
    XF\Job\Manager->runByIds() in src/XF/Admin/Controller/Tools.php at line 120
    XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 249
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 89
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1880
    XF\App->run() in src/XF.php at line 328
    XF::runApp() in admin.php at line 13

Hi @Chris D @Slavik , Please help.
 
XF2.0 seems to be very problematic.
Well, it does seem to be for you. But not generally.

If the xf_template_phrase table was previously missing, and you followed the previous advice given to recreate it, you shouldn't be getting the Unknown column 'template_id' error. You can see in the following it is clearly defined in the table:
Code:
CREATE TABLE `xf_template_phrase` (
  `template_id` int(10) UNSIGNED NOT NULL,
  `phrase_title` varbinary(100) NOT NULL,
  PRIMARY KEY (`template_id`,`phrase_title`),
  KEY `phrase_title` (`phrase_title`)
) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
You may want to attempt to delete the table entirely again, and re-run the above query and try again to see if anything changes.
 
Well, it does seem to be for you. But not generally.

If the xf_template_phrase table was previously missing, and you followed the previous advice given to recreate it, you shouldn't be getting the Unknown column 'template_id' error. You can see in the following it is clearly defined in the table:
Code:
CREATE TABLE `xf_template_phrase` (
  `template_id` int(10) UNSIGNED NOT NULL,
  `phrase_title` varbinary(100) NOT NULL,
  PRIMARY KEY (`template_id`,`phrase_title`),
  KEY `phrase_title` (`phrase_title`)
) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
You may want to attempt to delete the table entirely again, and re-run the above query and try again to see if anything changes.


I accept my mistake Boss. Explained this to my host and they resolved it using the table shared by you.

Thanks a ton.
 
Top Bottom