XF 2.1 Database field missing Push on Conversation

Ladegro

Active member
Somehow, somewhere, we've had a corruption in our forum resulting in a missing database field. On setting the option to receive push messages when a private conversation is started, the following error occurs:

Code:
XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'push_on_conversation' in 'field list' in src/XF/Db/AbstractStatement.php at line 228
[LIST=1]
[*]XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
[*]XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 39
[*]XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
[*]XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
[*]XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 322
[*]XF\Db\AbstractAdapter->update() in src/XF/Mvc/Entity/Entity.php at line 1457
[*]XF\Mvc\Entity\Entity->_saveToSource() in src/XF/Mvc/Entity/Entity.php at line 1184
[*]XF\Mvc\Entity\Entity->save() in src/XF/Mvc/Entity/Entity.php at line 1202
[*]XF\Mvc\Entity\Entity->save() in src/XF/Mvc/FormAction.php at line 69
[*]XF\Mvc\FormAction->XF\Mvc\{closure}() in src/XF/Mvc/FormAction.php at line 187
[*]XF\Mvc\FormAction->run() in src/XF/Pub/Controller/Account.php at line 312
[*]XF\Pub\Controller\Account->actionPreferences() in src/XF/Mvc/Dispatcher.php at line 350
[*]XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
[*]XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
[*]XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
[*]XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2184
[*]XF\App->run() in src/XF.php at line 391
[*]XF::runApp() in index.php at line 20
[/LIST]

Also when upgrading to the latest 2.6.1 patch 1, a similar error occurred, although the upgrade seems to have finished anyway.

First question is: can I manually create this field in the database and add it to the user_option table? With what parameters? (tried that with tinyint(3)-unsigned-default:1, and that works...

Second question: is there some kind of database consistency check to run, as there is for the files on disk, to make sure this is the only corruption?

Third question: since another admin has coincidently cleared the server error log, we cannot see what that error looked like, but is there a way to determine if this is caused by any of the installed addons?

Hope you guys can shed some light on this. Thanks.
 
Last edited:
Second question: is there some kind of database consistency check to run, as there is for the files on disk, to make sure this is the only corruption?
There isn't anything built in but a missing table or column will become evident very quickly due to errors being logged.

Third question: since another admin has coincidently cleared the server error log, we cannot see what that error looked like, but is there a way to determine if this is caused by any of the installed addons?
Impossible to say without some sort of log or trace, but the error log entries wouldn't log the column being dropped anyway.
 
Back
Top Bottom