database-error from WooCommerce?
-
I get lots of errors in the logs of one of the websites I maintain that use WooCommerce. The errors look like:
=============
[10-Dec-2018 18:42:58 UTC] WordPress databasefout Unknown column ‘wp_postmeta.meta_value’ in ‘order clause’ bij query SELECT wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = ‘post’ AND ((wp_posts.post_status = ‘publish’)) ORDER BY wp_postmeta.meta_value+0 DESC, wp_posts.post_date DESC LIMIT 0, 3 gemaakt door require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/plugins/woocommerce/templates/archive-product.php’), do_action(‘woocommerce_sidebar’), WP_Hook->do_action, WP_Hook->apply_filters, Avada_Woocommerce->add_sidebar, do_action(‘avada_after_content’), WP_Hook->do_action, WP_Hook->apply_filters, Avada_Layout->append_sidebar_single, get_template_part, locate_template, load_template, require(‘/themes/Avada/templates/sidebar-1.php’), generated_dynamic_sidebar, Sidebar_Generator::get_sidebar, dynamic_sidebar, WP_Widget->display_callback, WP_Widget_Recent_Posts->widget, WP_Query->__construct, WP_Query->query, WP_Query->get_posts
=============
Somehow the query tries to order results on a column NOT being available from the basic query (which only asks for wp_posts.ID).
As (part of) WooCommerce is mentioned in the error-line as a plugin, I suspect WooCommerce creating these errors in templates/archive-product.php but it could easily be something else mentioned in the errorlines ??
Anybody got suggestions?!
Running WooCommerce 3.5.2 on a WordPress 5.0 website with Avada as the theme.
Regards,
Klaus
- The topic ‘database-error from WooCommerce?’ is closed to new replies.