XF 2.0 Database Fault on admin.php

Asser

Active member
I login to the admin panel and receiving such an error::

XF\Db\Exception: MySQL statement prepare error [1146]: Table '*********.xf_error_log' doesn't exist in src/XF/Db/AbstractStatement.php at line 212
  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 79
  5. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 91
  6. XF\Db\AbstractAdapter->fetchOne() in src/XF/Mvc/Entity/Finder.php at line 1104
  7. XF\Mvc\Entity\Finder->total() in src/XF/Admin/Controller/Index.php at line 96
  8. XF\Admin\Controller\Index->actionIndex() in src/addons/ThemeHouse/UIX/XF/Admin/Controller/Index.php at line 9
  9. ThemeHouse\UIX\XF\Admin\Controller\Index->actionIndex() in src/addons/ThemeHouse/ImageOptimizer/XF/Admin/Controller/Index.php at line 9
  10. ThemeHouse\ImageOptimizer\XF\Admin\Controller\Index->actionIndex() 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 1889
  14. XF\App->run() in src/XF.php at line 328
  15. XF::runApp() in admin.php at line 13
 
Somehow the xf_error_log table has been deleted.
Did you do anything which may have caused that?
Any recent actions at all? Contact your host to see if they have done anything.
 
Somehow the xf_error_log table has been deleted.
Did you do anything which may have caused that?
Any recent actions at all? Contact your host to see if they have done anything.
I think so my host do something coz he sent email updating DNS!
I will contact them.
Thanks!.
So is it possible to recreate it manually??
 
Last edited:
Updating your DNS should not have affected that at all. Yes you can recreate it, I believe it should still be the same:
Code:
CREATE TABLE xf_error_log (
        error_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
        exception_date INT UNSIGNED NOT NULL,
        user_id INT UNSIGNED DEFAULT NULL,
        ip_address VARBINARY(16) NOT NULL DEFAULT '',
        exception_type VARCHAR(75) NOT NULL,
        message TEXT NOT NULL,
        filename VARCHAR(255) NOT NULL,
        line INT UNSIGNED NOT NULL,
        trace_string MEDIUMTEXT NOT NULL,
        request_state MEDIUMBLOB NOT NULL,
        PRIMARY KEY (error_id),
        KEY exception_date (exception_date)
    ) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci

But you still need to find the cause.
 
Back
Top Bottom