XF 2.1 Updating Phrase leads to error

tajhay

Well-known member
Trying to update the following phrase:
New (happens with others too)

191259


Error occuring:
XF\Db\Exception: MySQL statement prepare error [1932]: Table 'nzwarrio_xf2.xf_template_phrase' doesn't exist in engine in src/XF/Db/AbstractStatement.php at line 217
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 39
  3. XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
  4. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 89
  5. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 121
  6. XF\Db\AbstractAdapter->fetchAllColumn() in src/XF/Service/Phrase/Compile.php at line 63
  7. XF\Service\Phrase\Compile->recompileIncludeContent() in src/XF/Entity/Phrase.php at line 171
  8. XF\Entity\Phrase->_postSave() in src/XF/Mvc/Entity/Entity.php at line 1202
  9. XF\Mvc\Entity\Entity->save() in src/XF/Mvc/FormAction.php at line 69
  10. XF\Mvc\FormAction->XF\Mvc\{closure}() in src/XF/Mvc/FormAction.php at line 187
  11. XF\Mvc\FormAction->run() in src/XF/Admin/Controller/Phrase.php at line 128
  12. XF\Admin\Controller\Phrase->actionSave() in src/XF/Mvc/Dispatcher.php at line 321
  13. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
  14. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
  15. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
  16. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
  17. XF\App->run() in src/XF.php at line 392
  18. XF::runApp() in admin.php at line 13

Also noticed i dont have a 'master' language...thought id seen it before. dont have it either on my XF1.5 board nor my test site (XF2.1 Beta 5). Not sure if its related.

191260
 
And the only way I could fix it was rename the db to something different, point the XF config file to the new name and restore a backup.
No matter what I did I couldn't write the backup to the original db name.
 
This won't be add-on related -- unless an add-on has deleted the table, which would be pretty insane.

As mentioned in the linked thread, this can be indicative of DB corruption. You may be able to recreate the table (as this doesn't really contain data that isn't rebuildable), though I'm willing to bet that will fail if you just run a create table query. You'll probably need to drop the table first, even though it may not even appear in the table list.

Corruption like this generally relates to an issue with MySQL itself, MySQL being stopped without following the normal shutdown, or even a potential hardware issue. Software can't (or shouldn't be able to) trigger corruption like this.
 
I have a couple of test 2.1 sites running with no issues. But this one particular site was a trial upgrade from XF 1.5 to 2.1 and worked fine for a week. Only add-ons I had installed were XFES and then yesterday installed XFMG and then my issues started.

If it's not XFMG causing it, maybe a bug in MariaDB 10.2 causing InnoDB corruption of that particular table?
 
These should all be present in XF2

Code:
xf_template
xf_template_history
xf_template_map
xf_template_modification
xf_template_modification_log
xf_template_phrase
 
Top Bottom