XF 2.2 can you help with these server errors

hello,
i've got these server errors and hope to solve em before to ruins the forum
post solution with number please

1 - server problem
  • XF\Db\InvalidQueryException: Error rendering widget: MySQL statement prepare error [1176]: Key 'last_post_date' doesn't exist in table 'xf_thread'
  • src/XF/Db/AbstractStatement.php:230

SELECT xf_thread., xf_forum_Forum_1., xf_node_Node_2., xf_user_User_3., xf_permission_cache_content_Permissions_4., xf_user_LastPoster_5. FROM xf_thread FORCE INDEX (last_post_date) LEFT JOIN xf_forum AS xf_forum_Forum_1 ON (xf_forum_Forum_1.node_id = xf_thread.node_id)LEFT JOIN xf_node AS xf_node_Node_2 ON (xf_node_Node_2.node_id = xf_forum_Forum_1.node_id)LEFT JOIN xf_user AS xf_user_User_3 ON (xf_user_User_3.user_id = xf_thread.user_id)LEFT JOIN xf_permission_cache_content AS xf_permission_cache_content_Permissions_4 ON (xf_permission_cache_content_Permissions_4.content_type = 'node' AND xf_permission_cache_content_Permissions_4.content_id = xf_node_Node_2.node_id AND xf_permission_cache_content_Permissions_4.permission_combination_id = '1')LEFT JOIN xf_user AS xf_user_LastPoster_5 ON (xf_user_LastPoster_5.user_id = xf_thread.last_post_user_id) WHERE (xf_forum_Forum_1.find_new = 1) AND (xf_thread.discussion_state = 'visible') AND (xf_thread.discussion_type <> 'redirect') AND (xf_thread.last_post_date > 1708340609) ORDER BY xf_thread.last_post_date DESC LIMIT 10------------#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL statement...', 1176, '42000')#1 src/XF/Db/Mysqli/Statement.php(41): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1176, '42000')#2 src/XF/Db/Mysqli/Statement.php(56): XF\Db\Mysqli\Statement->prepare()#3 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()#4 src/XF/Mvc/Entity/Finder.php(1430): XF\Db\AbstractAdapter->query(' SELECT `xf_...')#5 src/XF/Widget/NewPosts.php(89): XF\Mvc\Entity\Finder->fetch()#6 internal_data/code_cache/widgets/_7_forum_overview_new_posts.php(5): XF\Widget\NewPosts->render()#7 src/XF/Template/Templater.php(7729): XF\SubContainer\Widget->{closure}(Object(XF\Template\Templater), Array, Array)#8 src/XF/SubContainer/Widget.php(168): XF\Template\Templater->renderWidgetClosure(Object(Closure), Array)#9 src/XF/Template/Templater.php(1940): XF\SubContainer\Widget->getCompiledWidget(Array, Array)#10 internal_data/code_cache/templates/l2/s1/public/forum_list.php(216): XF\Template\Templater->widgetPosition('forum_list_side...', Array)#11 src/XF/Template/Templater.php(1655): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)#12 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('forum_list', Array)#13 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()#14 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Forum\\Listin...', 'public:forum_li...', Array)#15 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))#16 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))#17 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')#18 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()#19 src/XF.php(524): XF\App->run()#20 index.php(20): XF::runApp('XF\\Pub\\App')#21 {main}

  • XF\Db\Exception: Phrase rendering error: MySQL statement prepare error [1146]: Table 'ii8dxkor_yas15dx.xf_phrase_compiled' doesn't exist
  • src/XF/Db/AbstractStatement.php:230

SELECT title, phrase_text
FROM xf_phrase_compiled
WHERE language_id = ?
AND title IN ('user_name', 'join_date', 'last_activity', 'messages', 'solutions', 'trophy_points', 'reaction_score', 'running', 'cron_entries')

------------

#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL statement...', 1146, '42S02')
#1 src/XF/Db/Mysqli/Statement.php(41): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1146, '42S02')
#2 src/XF/Db/Mysqli/Statement.php(56): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(177): XF\Db\AbstractAdapter->query('
SELECT titl...', '2')
#5 src/XF/Language.php(374): XF\Db\AbstractAdapter->fetchPairs('
SELECT titl...', '2')
#6 src/XF/Language.php(261): XF\Language->loadPhrases()
#7 src/XF/Language.php(132): XF\Language->getPhraseText('running')
#8 src/XF/Phrase.php(54): XF\Language->renderPhrase('running', Array, 'html', Array)
#9 src/XF/Phrase.php(61): XF\Phrase->render()
#10 [internal function]: XF\Phrase->__toString()
#11 src/XF/Job/Cron.php(62): sprintf('%s... %s', Object(XF\Phrase), Object(XF\Phrase))
#12 src/XF/Job/AbstractJob.php(61): XF\Job\Cron->getStatusMessage()
#13 src/XF/Job/Cron.php(53): XF\Job\AbstractJob->resume()
#14 src/XF/Job/Manager.php(260): XF\Job\Cron->run(8)
#15 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#16 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#17 job.php(43): XF\Job\Manager->runQueue(false, 8)
#18 {main}
  • XF\Db\Exception: MySQL statement prepare error [1146]: Table 'ii8dxkor_yas15dx.xf_session' doesn't exist
  • src/XF/Db/AbstractStatement.php:230

-- XFDB=fromWrite
SELECT session_data
FROM xf_session
WHERE session_id = ?
AND expiry_date >= ?

------------

#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL statement...', 1146, '42S02')
#1 src/XF/Db/Mysqli/Statement.php(41): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1146, '42S02')
#2 src/XF/Db/Mysqli/Statement.php(56): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(152): XF\Db\AbstractAdapter->query('
-- XFDB=fro...', Array)
#5 src/XF/Session/DbStorage.php(30): XF\Db\AbstractAdapter->fetchOne('
-- XFDB=fro...', Array)
#6 src/XF/Session/Session.php(55): XF\Session\DbStorage->getSession('5obz5GUe9aMqZd4...')
#7 src/XF/App.php(908): XF\Session\Session->start([invalid])
#8 src/XF/Container.php(31): XF\App->XF\{closure}(Object(XF\Container))
#9 src/XF/Pub/App.php(48): XF\Container->offsetGet('session.public')
#10 src/XF/Container.php(31): XF\Pub\App->XF\Pub\{closure}(Object(XF\Container))
#11 src/XF/App.php(2833): XF\Container->offsetGet('session')
#12 src/XF/Pub/App.php(153): XF\App->session()
#13 src/XF/App.php(2483): XF\Pub\App->start(true)
#14 src/XF.php(524): XF\App->run()
#15 index.php(20): XF::runApp('XF\\Pub\\App')
#16 {main}

  • XF\Db\Exception: MySQL statement prepare error [1146]: Table 'ii8dxkor_yas15dx.xf_session' doesn't exist
  • src/XF/Db/AbstractStatement.php:230


-- XFDB=fromWrite
SELECT session_data
FROM xf_session
WHERE session_id = ?
AND expiry_date >= ?

------------

#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL statement...', 1146, '42S02')
#1 src/XF/Db/Mysqli/Statement.php(41): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1146, '42S02')
#2 src/XF/Db/Mysqli/Statement.php(56): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(152): XF\Db\AbstractAdapter->query('
-- XFDB=fro...', Array)
#5 src/XF/Session/DbStorage.php(30): XF\Db\AbstractAdapter->fetchOne('
-- XFDB=fro...', Array)
#6 src/XF/Session/Session.php(55): XF\Session\DbStorage->getSession('jpE3Nr5xQoZ3UUm...')
#7 src/XF/App.php(908): XF\Session\Session->start([invalid])
#8 src/XF/Container.php(31): XF\App->XF\{closure}(Object(XF\Container))
#9 src/XF/Pub/App.php(48): XF\Container->offsetGet('session.public')
#10 src/XF/Container.php(31): XF\Pub\App->XF\Pub\{closure}(Object(XF\Container))
#11 src/XF/App.php(2833): XF\Container->offsetGet('session')
#12 src/XF/Pub/App.php(153): XF\App->session()
#13 src/XF/App.php(2483): XF\Pub\App->start(true)
#14 src/XF.php(524): XF\App->run()
#15 index.php(20): XF::runApp('XF\\Pub\\App')
#16 {main}

  • XF\Db\Exception: MySQL statement prepare error [1146]: Table 'ii8dxkor_yas15dx.xf_user' doesn't exist
  • src/XF/Db/AbstractStatement.php:230


SELECT xf_forum., xf_node_Node_1., xf_user_LastPostUser_2., xf_thread_LastThread_3.
FROM xf_forum
LEFT JOIN xf_node AS xf_node_Node_1 ON (xf_node_Node_1.node_id = xf_forum.node_id)
LEFT JOIN xf_user AS xf_user_LastPostUser_2 ON (xf_user_LastPostUser_2.user_id = xf_forum.last_post_user_id)
LEFT JOIN xf_thread AS xf_thread_LastThread_3 ON (xf_thread_LastThread_3.thread_id = xf_forum.last_thread_id)
WHERE (xf_forum.node_id IN (2))


------------

#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL statement...', 1146, '42S02')
#1 src/XF/Db/Mysqli/Statement.php(41): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1146, '42S02')
#2 src/XF/Db/Mysqli/Statement.php(56): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Mvc/Entity/Finder.php(1430): XF\Db\AbstractAdapter->query('
SELECT `xf_...')
#5 src/XF/Mvc/Entity/Manager.php(214): XF\Mvc\Entity\Finder->fetch()
#6 src/XF/Repository/Node.php(146): XF\Mvc\Entity\Manager->findByIds('XF:Forum', Array, Array)
#7 src/XF/Repository/Node.php(20): XF\Repository\Node->loadNodeTypeDataForNodes(Object(XF\Mvc\Entity\ArrayCollection))
#8 src/XF/Pub/Controller/Forum.php(54): XF\Repository\Node->getNodeList()
#9 src/XF/Mvc/Dispatcher.php(352): XF\Pub\Controller\Forum->actionList(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF\\Pub\\Controll...', 'List', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Forum), Object(XF\Mvc\Reply\Reroute))
#11 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Forum), Object(XF\Mvc\Reply\Reroute))
#12 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#14 src/XF.php(524): XF\App->run()
#15 index.php(20): XF::runApp('XF\\Pub\\App')
#16 {main}
 
and this error

  • XF\Db\Exception: MySQL query error [1048]: Column 'prefix_group_id' cannot be null
  • src/XF/Db/AbstractStatement.php:230
INSERT INTO xf_thread_prefix_group (display_order, prefix_group_id) VALUES (?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL query err...', 1048, '23000')
#1 src/XF/Db/Mysqli/Statement.php(79): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1048, '23000')
#2 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(220): XF\Db\AbstractAdapter->query('INSERT INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1526): XF\Db\AbstractAdapter->insert('xf_thread_prefi...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1258): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/Mvc/FormAction.php(71): XF\Mvc\Entity\Entity->save(true, false)
#7 src/XF/Mvc/FormAction.php(189): XF\Mvc\FormAction->XF\Mvc\{closure}(Object(XF\Mvc\FormAction))
#8 src/XF/Admin/Controller/AbstractPrefix.php(370): XF\Mvc\FormAction->run()
#9 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\AbstractPrefix->actionGroupSave(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:ThreadPrefix', 'Groupsave', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ThreadPrefix), NULL)
#11 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ThreadPrefix), NULL)
#12 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#14 src/XF.php(524): XF\App->run()
#15 admin.php(13): XF::runApp('XF\\Admin\\App')
#16 {main}
 
You can remove all files and the database, then re-upload all installation files and install into a new database.
i did that too, i created new database and moved only important things like threads and attachments and members and made new installation for the forum
and the above is the result, before I've done that my forum wasn't even working but now work with some errors I mentioned in this thread
 
I'm not sure what you mean by moving only important things. You cannot use any data from the old database. Without a viable backup you would have to start from scratch.
 
I'm not sure what you mean by moving only important things. You cannot use any data from the old database. Without a viable backup you would have to start from scratch.
i kept the databases freshly new but moved xf_attachments, xf_category, ... etc that concerns members, threads and replies.
when i copied all the databases the forum wouldn't work
 
You cannot move any content or data from the old database, you would have to start fresh.
anyway i just finished fixing all the problems above without re-installing the script or starting freshly

you "Xenforo developers", but since I started using the script and putting my Troubleshooting and problems here u never helped
I spent a month just trying to fix all the problems and all answers on my ticket in support were "call your host", and "re-install the script", and when I offered to pay you said, "we can check files but not the databases". and finally, I've done it. though I regret using this script that is full of errors all the time, and xenforo support team doesn't really help fix problems. i still using it cause I've no choice, I paid.

its something i had on my chest, sorry to bother you and thanks for following up.
you can close the thread, all done now
 
I understand it's a frustrating situation, but issues of this nature fall outside of the scope of support. We don't have any way of knowing what caused your files or schema to become corrupt. In any case, I'm glad to hear you were able to salvage the data somehow. I'd still highly recommend having a solid backup strategy to help mitigate against problems like this in the future.
 
Back
Top Bottom