Support Forum

Invalid database query

CH chessert
chessert
Member

Upgraded to WP 4.0 and Simple Press 5.5.1.  Now getting database errors, which prevent forum members (including Admin) from viewing posts.  From the PHP error log:

[24-Sep-2014 07:13:51 America/New_York] WordPress database error Unknown column ‘attachments’ in ‘field list’ for query SELECT group_id, wp_sftopics.topic_id, wp_sftopics.forum_id, topic_name, topic_slug, topic_status, topic_pinned, topic_icon, topic_opened, wp_sftopics.post_count, forum_slug, forum_status, forum_disabled, forum_rss_private, wp_sfposts.post_id, post_date, wp_sfposts.user_id, guest_name, guest_email, post_status, post_pinned, post_index, post_edit, poster_ip, source, post_content, NULL AS new_post, blog_post_id, attachments, topic_subs, use_tags, topic_status_set, topic_status_flag FROM wp_sftopics JOIN wp_sfposts ON wp_sftopics.topic_id=wp_sfposts.topic_id JOIN wp_sfforums ON wp_sftopics.forum_id=wp_sfforums.forum_id WHERE wp_sftopics.topic_id=525 ORDER BY post_pinned DESC, wp_sfposts.post_id ASC LIMIT 0, 15 made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/wp-clear321/page.php’), the_content, apply_filters(‘the_content’), call_user_func_array, sp_render_forum, sp_process_template, sp_load_template, include(‘/sp-resources/forum-themes/default/templates/spTopicView.php’), sp_this_topic, spTopicView->__construct, spTopicView->sp_topicview_query, spdbComplex->select, spdb_select

And…

[24-Sep-2014 07:45:05 America/New_York] WordPress database error Unknown column ‘attachments’ in ‘where clause’ for query SELECT topic_id FROM wp_sfposts WHERE wp_sfposts.topic_id IN (1350,1364,1355,1361,1360,1353,1357,1359,1358,1354,1348,1347,1346,1333,1344,1343,1342,1341,1339,1337,1340,1335,1334,1328,1322) AND attachments IS NOT NULL made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/wp-clear321/page.php’), the_content, apply_filters(‘the_content’), call_user_func_array, sp_render_forum, sp_process_template, sp_load_template, include(‘/sp-resources/forum-themes/default/templates/spForumView.php’), sp_this_forum, spForumView->__construct, spForumView->sp_forumview_query, apply_filters(‘sph_forumview_combined_data’), call_user_func_array, sp_plupload_forumview_query, sp_plupload_do_forumview_query, spdb_select

I tried changing themes to 2014, but that didn’t change any behavior.

2 Answers

New Answer

CH chessert
chessert
Member

Nevermind – SP plugin updates weren’t showing under available WP updates.  Updated the SP plugins and theme, and all is good.  Leaving this up, just in case someone else finds it useful.  Otherwise, this topic can be deleted.