XF 1.5 Issues after upgrading

leslie dow

Active member
Hi all
I upgraded to 1.5.3 yesterday (from 1.5.2) and all seemed fine. Ran a few tests, board seemed okay, then had an odd problem. I did also upgrade one addon ( after the 1.5.3, but again then all seemed to check out.) and these problems are happening nearly 12 hours after the upgrade and after multiple posts have been made. The addon I upgraded is PostRating by @Luke F . Any help in figuring this out will be greatly appreciated.

Now nearly 12 hours after the latest change I am getting this error from the logs (I can access the admin panel) and when I try to access the site I get the following:
An unexpected error occurred. Please try again later.

Viewing source of that error I see this:
<body xmlns="http://www.w3.org/1999/xhtml" data-pinterest-extension-installed="cr1.39.1">An unexpected error occurred. Please try again later.</body>

Here is the error from the Admin panel.

Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column 'forum.node_id' in 'on clause' - library/Zend/Db/Statement/Mysqli.php:77
Generated By: Unknown Account, 43 minutes ago
Stack Trace
#0 /home/savvyauthors/public_html/Community/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('\n\t\t\t\tSELECT thr...')
#1 /home/savvyauthors/public_html/Community/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '\n\t\t\t\tSELECT thr...')
#2 /home/savvyauthors/public_html/Community/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('\n\t\t\t\tSELECT thr...')
#3 /home/savvyauthors/public_html/Community/library/XenForo/Model.php(219): Zend_Db_Adapter_Abstract->query('\n\t\t\t\tSELECT thr...', Array, 2)
#4 /home/savvyauthors/public_html/Community/library/XenForo/Model/Thread.php(563): XenForo_Model->fetchAllKeyed('\n\t\t\t\tSELECT thr...', 'thread_id')
#5 /home/savvyauthors/public_html/Community/library/XenForo/ControllerPublic/Forum.php(104): XenForo_Model_Thread->getThreads(Array, Array)
#6 /home/savvyauthors/public_html/Community/library/Waindigo/CustomFields/Extend/XenForo/ControllerPublic/Forum.php(16): XenForo_ControllerPublic_Forum->actionIndex()
#7 /home/savvyauthors/public_html/Community/library/WidgetFramework/XenForo/ControllerPublic/Forum.php(13): Waindigo_CustomFields_Extend_XenForo_ControllerPublic_Forum->actionIndex()
#8 /home/savvyauthors/public_html/Community/library/XenForo/FrontController.php(351): WidgetFramework_XenForo_ControllerPublic_Forum->actionIndex()
#9 /home/savvyauthors/public_html/Community/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/savvyauthors/public_html/Community/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
["url"] => string(51) "http://savvyauthors.com/Community/index.php?forums/"
["_GET"] => array(1) {
["forums/"] => string(0) ""
}
["_POST"] => array(0) {
}
}

Delete...Close
 
If you disable the widget framework & Waindigo's Custom Fields add-on, are you able to access your site? Have you unisntalled or installed any add-ons lately?
 
Hmm.. might be the custom fields, I get the following when I try to disable it:
The following error occurred:
An exception occurred: Mysqli prepare error: Unknown column 'forum.node_id' in 'on clause' in /home/savvyauthors/public_html/Community/library/Zend/Db/Statement/Mysqli.php on line 77

  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 106
  6. XenForo_Model_Forum->getForums() in XenForo/Deferred/Forum.php at line 21
  7. XenForo_Deferred_Forum->execute() in XenForo/Model/Deferred.php at line 295
  8. XenForo_Model_Deferred->runDeferred() in XenForo/Model/Deferred.php at line 429
  9. XenForo_Model_Deferred->_runInternal() in XenForo/Model/Deferred.php at line 374
  10. XenForo_Model_Deferred->run() in XenForo/ViewRenderer/Abstract.php at line 352
  11. XenForo_ViewRenderer_Abstract::hasManualDeferredToRun() inXenForo/ViewRenderer/Json.php at line 147
  12. XenForo_ViewRenderer_Json::_addDefaultParams() in XenForo/ViewRenderer/Json.php at line 185
  13. XenForo_ViewRenderer_Json::jsonEncodeForOutput() in XenForo/ViewRenderer/Json.phpat line 37
  14. XenForo_ViewRenderer_Json->renderRedirect() in XenForo/FrontController.php at line 616
  15. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
  16. XenForo_FrontController->run() in /home/savvyauthors/public_html/Community/admin.phpat line 13
 
SQL result
Host: localhost3306
Database: savvyaut_XF_r
Generation Time: Dec 10, 2015 at 06:25 AM
Generated by: phpMyAdmin 4.0.10.7 / MySQL 5.6.27
SQL query: SHOW CREATE TABLE xf_forum;
Rows: 1


Table Create Table
xf_forum 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 recently-posting 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 /find-new/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',
`bdimage_last_post_image` text,
`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',
`field_cache` mediumblob,
`custom_fields` mediumblob,
`required_fields` mediumblob,
`social_forum_field_cache` mediumblob,
`custom_social_forum_fields` mediumblob,
`required_social_forum_fields` mediumblob,
`member_permissions` text,
`moderator_permissions` text,
`creator_permissions` text,
`min_tags` smallint(5) unsigned NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8
 
Was there a database restore done or anything like that? You're missing a core field in that table -- not one that would ever be touched by XF. I couldn't really begin to guess why or how it has been removed.

Unfortunately, I would have to recommend restoration of a backup that doesn't have this issue to get it back.
 
Thanks Mike
Something did happen last night but it was to a Wordpress blog. I didnt think the two were related, but I suspect so. I'll get the database restored.

Leslie
 
Ok this is just getting weirder. Now my ISP is telling me that the past couple of backups are corrupted. Apparently (and we are now way beyond my understanding technically) there are issues with InnoDB? Does this make sense to you guys?

Oh and the site was fully functional until 3am today. So these corrupted backups were before anything was amiss and also before I upgraded.

Thanks,
Leslie


"As stated, we tried restoring the database from the most recent backup at 12 A.M.12/10/15. We are attempting to manually restore the database by obtaining the data directory, all necessary files from the backup, and restoring on a local MySQL instance. After doing so, it appears there is an issue with all tables using InnoDB, as MyISAM tables are showing up fine. Reference link below to screenshot:

http://hostek.tk/i/1d568409a112a3195031

We've already tried the same with the backup from the 9th. If you would like us to attempt to go further back let us know.
"
 
Last edited:
If the backups have been taken correctly, there's no reason why they can't be restored.

It sounds though as if the process your host is using is flawed, to result in corrupt/unusable backups.

Unfortunately, without a viable backup/database, there's not really much you can do.
 
Yes, I agree. And am obviously kicking myself for relying on the host's backups. Never do that again...what a great cautionary tale, eh?

If anyone can think of something, please let me know.
Leslie
 
Yes, I agree. And am obviously kicking myself for relying on the host's backups. Never do that again...what a great cautionary tale, eh?

If anyone can think of something, please let me know.
Leslie

I have learnt that the hard way too, in my beginnings as a webmaster. If you do not have a backup yourself and your host 's backups are corrupted, then there is not much that you can do I am afraid. Can you ask your host to check their backups and see if they find a good one? Then they can restore that. You might loose some data, but there is nothing that can be done about that Ma`am.
 
thanks for the comments. Yes, the host is looking for a good backup. The issue is the the backup system they use does not play well with InnoDB. So the really scary thing is this would have been a problem in any situation where I needed a restore, and the more I poke into this the more certain I am that its not due to the upgrade but some other tampering. Always frustrating. That said, if anyone knows any solutions for restoring InnoDB tables let me know.

What they are telling me now is that its not at all related to the upgrade, but related to their backup system. They ahve someone coming in who has experience and they think he can do the restore.

Yeah, assuming I get out of this mess I am looking for a new ISP and likely a third party backup service to boot.
 
To me it looks like your host has messed up really bad. Any professional host should not cause these kind of problems. What is your host 's name if one can ask? What exactly is not playing well with their backups and InnoDB according to your host? This is a very vague explanation, or better said, excuse.
 
Hostek managed to get a backup restored and I'm now checking things out. I've asked for technical details on what happened and will post them here. Part of the issue seems to be that my VPS is Linux and they were trying to restore on a Windows machine.

Just to be clear, this was an issue of their backup system and had nothing to do with the 1.5.3 upgrade (which I have now reapplied and went just fine). That said, had I followed my own processes and not relied on theirs for normal backups, I would have been able to recover far more quickly since I had recently upgraded to 1.5.3. So the take home for me, is to not rely on the hosting service backup (sad, that).

Its really frustrating because one of the things I think we should be able to rely on from a hosting service is effing backups (and quick and reliable restoration of those backups).
 
OK. This has happened again. A new database, a presumably successful upgrade to 1.5.3, no other changes.
Most recently, I was able to do the upgrade and then saved the upgraded database. And it worked for about an hour and then more columns were dropped.
According to my ISP, there is nothing that has happened on the server side, they insist it has to be the application.

Thanks for any help.

I am getting the same error message in the server error logs:
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column 'forum.node_id' in 'on clause' - library/Zend/Db/Statement/Mysqli.php:77
Generated By: Unknown Account, 48 minutes ago

Stack Trace
#0 /home/savvyauthors/public_html/Community/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('\n\t\t\t\tSELECT thr...')
#1 /home/savvyauthors/public_html/Community/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '\n\t\t\t\tSELECT thr...')
#2 /home/savvyauthors/public_html/Community/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('\n\t\t\t\tSELECT thr...')
#3 /home/savvyauthors/public_html/Community/library/XenForo/Model.php(219): Zend_Db_Adapter_Abstract->query('\n\t\t\t\tSELECT thr...', Array, 2)
#4 /home/savvyauthors/public_html/Community/library/XenForo/Model/Thread.php(563): XenForo_Model->fetchAllKeyed('\n\t\t\t\tSELECT thr...', 'thread_id')
#5 /home/savvyauthors/public_html/Community/library/XenForo/ControllerPublic/Forum.php(104): XenForo_Model_Thread->getThreads(Array, Array)
#6 /home/savvyauthors/public_html/Community/library/Waindigo/CustomFields/Extend/XenForo/ControllerPublic/Forum.php(16): XenForo_ControllerPublic_Forum->actionIndex()
#7 /home/savvyauthors/public_html/Community/library/WidgetFramework/XenForo/ControllerPublic/Forum.php(13): Waindigo_CustomFields_Extend_XenForo_ControllerPublic_Forum->actionIndex()
#8 /home/savvyauthors/public_html/Community/library/XenForo/FrontController.php(351): WidgetFramework_XenForo_ControllerPublic_Forum->actionIndex()
#9 /home/savvyauthors/public_html/Community/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/savvyauthors/public_html/Community/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
["url"] => string(51) "http://savvyauthors.com/Community/index.php?forums/"
["_GET"] => array(1) {
["forums/"] => string(0) ""
}
["_POST"] => array(0) {
}
}

and when I browse to the forums I see this error in the Forum Pane:

Server Error
Mysqli prepare error: Unknown column 'forum.node_id' in 'on 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 Zend/Db/Adapter/Abstract.php at line 753
  5. Zend_Db_Adapter_Abstract->fetchRow() in XenForo/Model/Forum.php at line 29
  6. XenForo_Model_Forum->getForumById() in XenForo/ControllerHelper/ForumThreadPost.php at line 179
  7. XenForo_ControllerHelper_ForumThreadPost->getForumOrError() in XenForo/ControllerHelper/ForumThreadPost.php at line 38
  8. XenForo_ControllerHelper_ForumThreadPost->assertForumValidAndViewable() in XenForo/ControllerPublic/Forum.php at line 181
  9. XenForo_ControllerPublic_Forum->actionForum() in Waindigo/CustomFields/Extend/XenForo/ControllerPublic/Forum.php at line 29
  10. Waindigo_CustomFields_Extend_XenForo_ControllerPublic_Forum->actionForum() in LiquidPro/SimpleForms/Listener/Proxy/ControllerForum.php at line 7
  11. LiquidPro_SimpleForms_Listener_Proxy_ControllerForum->actionForum() in Andy/ForumModerators/ControllerPublic/Forum.php at line 13
  12. Andy_ForumModerators_ControllerPublic_Forum->actionForum() in XenForo/FrontController.php at line 351
  13. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  14. XenForo_FrontController->run() in /home/savvyauthors/public_html/Community/index.php at line 13

When I run the SQL: "SHOW CREATE TABLE xf_forum"
I get this:
SQL result
Host: localhost3306
Database: savvyaut_XF2015
Generation Time: Dec 11, 2015 at 11:12 AM
Generated by: phpMyAdmin 4.0.10.7 / MySQL 5.6.27
SQL query: SHOW CREATE TABLE xf_forum;
Rows: 1


Table Create Table
xf_forum 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 recently-posting 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 /find-new/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',
`bdimage_last_post_image` text,
`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',
`field_cache` mediumblob,
`custom_fields` mediumblob,
`required_fields` mediumblob,
`social_forum_field_cache` mediumblob,
`custom_social_forum_fields` mediumblob,
`required_social_forum_fields` mediumblob,
`member_permissions` text,
`moderator_permissions` text,
`creator_permissions` text,
`tabs_position_threads` varchar(20) NOT NULL DEFAULT '',
`min_tags` smallint(5) unsigned NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8
 
If you are sure the column was there after the restore then I would suspect an add-on is involved.

There is nothing in the core software which would cause a column to be dropped like that.
 
I know that the application ran for some period of time and yes that column was there. I guess I can restore again and disable all the addons and see if that works, right?
thanks
 
All
After a few days of this problem recurring, I now have a installation with 1.5.2 (before I tried to upgrade to 1.5.3 or upgrade postratings addon). My hosting provider was able to restore both a database and files that correspond to the software running a full 12 hours before any changes were made.

I am still getting the same column dropping and the same errors after the site is up for about 4-6 hours. Please note that this did not happen at all until after I upgraded 1.5.2 to 1.5.3, and upgraded a single addon: postratings.

The only other thing I can think of is that before I started to upgrade I set up a test or staging site. It did not use the same database, but I'm beginning to wonder if something in that test site is triggering or causing something that results in these database table drops.

To test this I am deleting the test site and removing the db that was used for that site.

I am literally at my wits end here. Nothing seems to make any sense.
Suggestions?

Thanks
 
Back
Top Bottom