Database errors
-
I’m getting a number of database errors from this plugin. Here are two of the recent unique errors:
WordPress database error Unknown column 'post_type' in 'where clause' for query SELECT wp_comments.* FROM wp_comments WHERE comment_post_ID = '3149' AND comment_approved = '1' AND post_type != 'ticket' ORDER BY comment_date_gmt DESC LIMIT 10 made by require('wp-blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts
It looks likewats_filter_comments_rss
is appending a where clause without knowing what’s being queried. In the case of the error, we’re querying the comments table, not the posts table.WordPress database error Unknown column 'wp_comments.comment_date_gmt' in 'where clause' for query SELECT wp1.comment_ID FROM wp_comments AS wp1 LEFT JOIN wp_posts AS wp3 ON wp1.comment_post_id = wp3.ID WHERE ( wp1.comment_approved = '1' ) AND wp1.comment_post_ID = 39282 AND ( \n wp_comments.comment_date_gmt < '2017-01-25 22:30:12'\n) AND wp3.post_status = 'publish' AND NOT EXISTS (SELECT * FROM wp_commentmeta AS wp2 WHERE wp1.comment_ID = wp2.comment_id AND wp2.meta_key = 'wats_internal_update' AND wp2.meta_value = 1) ORDER BY wp1.comment_date_gmt DESC made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_feed, do_action('do_feed_rss2'), WP_Hook->do_action, WP_Hook->apply_filters, do_feed_rss2, load_template, require_once('wp-includes/feed-rss2-comments.php'), comment_link, get_comment_link, get_page_of_comment, WP_Comment_Query->query, WP_Comment_Query->get_comments, WP_Comment_Query->get_comment_ids
It looks like there’s some code to replacewp_comments.comment_date_gmt
withwp1.comment_date_gmt
, but it’s not catching this query.Note: I’m using version 1.0.61 of Wats Premium.
- The topic ‘Database errors’ is closed to new replies.