XF 1.4 Mysqli prepare error: Unknown column 'forum.node_id' in 'where clause'

Chris Radford

Active member
Hi,

Yesterday I posted about an issue with our forum, we had to restore a prior backup to fix the issue. Please see here; https://xenforo.com/community/threads/a-server-error-occurred-please-try-again-later.94735/

Today, we have the following error;

Server Error
Mysqli prepare error: Unknown column 'forum.node_id' in 'where clause'

  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.php at line 219
  5. XenForo_Model->fetchAllKeyed() in XenForo/Model/Forum.php at line 133
  6. XenForo_Model_Forum->getExtraForumDataForNodes() in XenForo/NodeHandler/Forum.php at line 85
  7. XenForo_NodeHandler_Forum->getExtraDataForNodes() in XenForo/Model/Node.php at line 571
  8. XenForo_Model_Node->mergeExtraNodeDataIntoNodeList() in XenForo/Model/Node.php at line 773
  9. XenForo_Model_Node->getNodeListDisplayData() in XenForo/Model/Node.php at line 745
  10. XenForo_Model_Node->getNodeDataForListDisplay() in XenForo/ControllerPublic/Forum.php at line 81
  11. XenForo_ControllerPublic_Forum->actionIndex() in WidgetFramework/XenForo/ControllerPublic/Forum.php at line 13
  12. WidgetFramework_XenForo_ControllerPublic_Forum->actionIndex() in Borbole/RecentThreads/ControllerPublic.php at line 8
  13. Borbole_RecentThreads_ControllerPublic->actionIndex() in XenForo/FrontController.php at line 347
  14. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  15. XenForo_FrontController->run() in /home/onefootb/onefootballforum.co.uk/index.php at line 13

I do have access to the AdminCP, can anybody please advise?
 
That would suggest the backup is also corrupt as a column appears to be missing.

Can you run this query in phpMyAdmin and paste the full text output?
Code:
show create table xf_forum;
 
That would suggest the backup is also corrupt as a column appears to be missing.

Can you run this query in phpMyAdmin and paste the full text output?
Code:
show create table xf_forum;

Thanks for the quick reply. The backup was working for 24 hours before seemingly breaking again.

How I have done the query correctly, here you go;

CREATE TABLE `xf_forum` ( `discussion_count` int(10) unsigned NOT NULL DEFAULT '0', `message_count` int(10) unsigned NOT NULL DEFAULT '0', `last_post_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Most recent post_id', `last_post_date` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Date of most recent post', `last_post_user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'User_id of user posting most recently', `last_post_username` varchar(50) NOT NULL DEFAULT '' COMMENT 'Username of most recentlyposting user', `last_thread_title` varchar(150) NOT NULL DEFAULT '' COMMENT 'Title of thread most recent post is in', `moderate_replies` tinyint(3) unsigned NOT NULL DEFAULT '0', `allow_posting` tinyint(3) unsigned NOT NULL DEFAULT '1', `count_messages` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT 'If not set, messages posted (directly) within this forum will not contribute to user message totals.', `find_new` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT 'Include posts from this forum when running /findnew/threads', `prefix_cache` mediumblob NOT NULL COMMENT 'Serialized data from xf_forum_prefix, [group_id][prefix_id] => prefix_id', `default_prefix_id` int(10) unsigned NOT NULL DEFAULT '0', `default_sort_order` varchar(25) NOT NULL DEFAULT 'last_post_date', `default_sort_direction` varchar(5) NOT NULL DEFAULT 'desc', `require_prefix` tinyint(3) unsigned NOT NULL DEFAULT '0', `allowed_watch_notifications` varchar(10) NOT NULL DEFAULT 'all', `xfa_sitemap` tinyint(4) NOT NULL DEFAULT '1', `moderate_threads` tinyint(3) unsigned NOT NULL DEFAULT '0', `allow_poll` tinyint(3) unsigned NOT NULL DEFAULT '1', `list_date_limit_days` smallint(5) unsigned NOT NULL DEFAULT '0', `tv_genre` text, `tv_network` int(10) unsigned NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8
 
Unfortunately the node_id column is missing.

I can only suggest restoring from an older, viable backup.

You may want to check whether any add-ons you have installed are responsible for the disappearing columns.
Or whether it is someone manually doing it (you can check the server logs).
 
Unfortunately the node_id column is missing.

I can only suggest restoring from an older, viable backup.

You may want to check whether any add-ons you have installed are responsible for the disappearing columns.
Or whether it is someone manually doing it (you can check the server logs).

Thanks for the quick response.

You may want to check whether any add-ons you have installed are responsible for the disappearing columns.
Do you have a method for doing this, other than uninstalling them all and seeing if that solves the issue?
 
The two of you may want to get together in a convo and compare add-ons that both are using, and see if you can eliminate them. One of the first ones I'd be looking at for commonality would be Borbole's Recent threads.. then widget framework. Also look at another other add-ons that both of you use that deal with the nodes in any way.

I use Widget Framework with no problems - but that doesn't preclude it may be interacting with another add-on.

Also, are both of you using the same hosting provider?
 
Top Bottom