• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 xf_thread_view' doesn't exist !! Did I just loose all my thead ?

#1
This is started to happen few hours ago and all my threads are inaccessible. There has been no changes made so not sure what it thinks that a table is missing. Is there a solution to this without using backup ?

Frontend Error:

Mysqli prepare error: Table 'db215081_woyhang.xf_thread_view' doesn't exist

  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in XenForo/Model/Thread.php at line 2506
  5. XenForo_Model_Thread->logThreadView() in XenForo/ControllerPublic/Thread.php at line 159
  6. XenForo_ControllerPublic_Thread->actionIndex() in XenForo/FrontController.php at line 351
  7. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  8. XenForo_FrontController->run() in /nfs/c12/h01/mnt/215081/domains/watchofyokai.com/html/hangout/index.php at line 13
Server Error Log
Error Info

Code:
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Table 'db215081_woyhang.xf_thread_view' doesn't exist - library/Zend/Db/Statement/Mysqli.php:77
Generated By: Unknown Account, 31 minutes ago
Stack Trace
#0 /nfs/c12/h01/mnt/215081/domains/watchofyokai.com/html/hangout/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('\n\t\t\tUPDATE xf_t...')
#1 /nfs/c12/h01/mnt/215081/domains/watchofyokai.com/html/hangout/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '\n\t\t\tUPDATE xf_t...')
#2 /nfs/c12/h01/mnt/215081/domains/watchofyokai.com/html/hangout/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('\n\t\t\tUPDATE xf_t...')
#3 /nfs/c12/h01/mnt/215081/domains/watchofyokai.com/html/hangout/library/XenForo/Model/Thread.php(2524): Zend_Db_Adapter_Abstract->query('\n\t\t\tUPDATE xf_t...')
#4 /nfs/c12/h01/mnt/215081/domains/watchofyokai.com/html/hangout/library/XenForo/CronEntry/Views.php(13): XenForo_Model_Thread->updateThreadViews()
#5 [internal function]: XenForo_CronEntry_Views::runViewUpdate(Array)
#6 /nfs/c12/h01/mnt/215081/domains/watchofyokai.com/html/hangout/library/XenForo/Model/Cron.php(357): call_user_func(Array, Array)
#7 /nfs/c12/h01/mnt/215081/domains/watchofyokai.com/html/hangout/library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)
#8 /nfs/c12/h01/mnt/215081/domains/watchofyokai.com/html/hangout/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_Cron->execute(Array, Array, 7.9999978542328, '')
#9 /nfs/c12/h01/mnt/215081/domains/watchofyokai.com/html/hangout/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.9999978542328, '', false)
#10 /nfs/c12/h01/mnt/215081/domains/watchofyokai.com/html/hangout/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#11 /nfs/c12/h01/mnt/215081/domains/watchofyokai.com/html/hangout/deferred.php(23): XenForo_Model_Deferred->run(false)
#12 {main}
Request State
array(3) {
  ["url"] => string(44) "http://watchofyokai.com/hangout/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(9) "/hangout/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
 

Brogan

XenForo moderator
Staff member
#2
Check with your host for any changes or issues on the server.

Tables should never randomly disappear from the database.

It should be possible to restore that particular table from a backup without any issues.
 

Chris D

XenForo developer
Staff member
#3
The important question is certainly how it got to be deleted.

The table is only a temporary table for counting how many times a thread is viewed. I would probably suggest, therefore, it's not worth restoring from a backup. You can re-create the table by running this query (you may still need your host for this):

Code:
CREATE TABLE xf_thread_view (
    thread_id INT UNSIGNED NOT NULL,
    KEY thread_id (thread_id)
) ENGINE=MEMORY CHARACTER SET utf8 COLLATE utf8_general_ci
But, again, please report this to your host and try and find out how it came to be deleted. There are certainly much worse tables that could get deleted. You should also make sure you have a current backup, just in case.