WordPress database error
-
Hello.
Wouldn’t you know what could cause this error?[01-May-2019 16:04:33 UTC] WordPress database error Table ‘database_name.wp_posts’ doesn’t exist for query
SELECT filtered_post.id, filtered_post.out_of_stock, COUNT(filtered_post.ID) as post_count FROM
(
SELECT filtered_post.*, max_filtered_post.max_meta_count, stock_table.out_of_stock_init as out_of_stock FROM
(
SELECT jk2d_posts.id as var_id, jk2d_posts.post_parent as ID, COUNT(jk2d_posts.id) as meta_count FROM jk2d_posts
INNER JOIN jk2d_postmeta AS pf1 ON (jk2d_posts.ID = pf1.post_id)
WHERE jk2d_posts.post_type = “product_variation”
AND jk2d_posts.post_status != “trash”
AND pf1.meta_key IN (“attribute_pa_color”) AND pf1.meta_value IN (“red”)
GROUP BY jk2d_posts.id
) as filtered_post
INNER JOIN
(
SELECT ID, MAX(meta_count) as max_meta_count FROM
(
SELECT jk2d_posts.id as var_id, jk2d_posts.post_parent as ID, COUNT(jk2d_posts.id) as meta_count FROM jk2d_posts
INNER JOIN jk2d_postmeta AS pf1 ON (jk2d_posts.ID = pf1.post_id)
WHERE jk2d_posts.post_type = “product_variation”
AND pf1.meta_key IN (“attribute_pa_color”) AND pf1.meta_value IN (“red”)
GROUP BY jk2d_posts.id
) as max_filtered_post
GROUP BY ID
) as max_filtered_post ON max_filtered_post.ID = filtered_post.ID AND max_filtered_post.max_meta_count = filtered_post.meta_count
LEFT JOIN
(
SELECT wp_posts.id as id, COALESCE(stock_table_init.out_of_stock_init1, “0”) as out_of_stock_init
FROM wp_posts
LEFT JOIN (
SELECT jk2d_posts.id as id, “1” as out_of_stock_init1
FROM jk2d_posts
WHERE jk2d_posts.id IN
(
SELECT object_id FROM jk2d_term_relationships
WHERE term_taxonomy_id IN ( 10 )
)
) as stock_table_init on wp_posts.id = stock_table_init.id
GROUP BY id
) as stock_table
ON filtered_post.var_id = stock_table.id
GROUP BY filtered_post.ID, out_of_stock
) as filtered_post
GROUP BY filtered_post.ID
HAVING post_count = 1 AND out_of_stock = 1
made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/vantage-child/woocommerce/archive-product.php’), do_shortcode, preg_replace_callback, do_shortcode_tag, BeRocket_AAPF_single_filter->shortcode, the_widget, BeRocket_new_AAPF_Widget_single->widget, the_widget, BeRocket_AAPF_Widget->widget, BeRocket_AAPF_Widget::get_attribute_values, apply_filters(‘berocket_add_out_of_stock_variable’), WP_Hook->apply_filters, BeRocket_AAPF_compat_woocommerce_variation::out_of_stock_variable
[01-May-2019 16:04:33 UTC] WordPress database error Table ‘database_name.wp_posts’ doesn’t exist for query
SELECT filtered_post.id, filtered_post.out_of_stock, COUNT(filtered_post.ID) as post_count FROM
(
SELECT filtered_post.*, max_filtered_post.max_meta_count, stock_table.out_of_stock_init as out_of_stock FROM
(
SELECT jk2d_posts.id as var_id, jk2d_posts.post_parent as ID, COUNT(jk2d_posts.id) as meta_count FROM jk2d_posts
INNER JOIN jk2d_postmeta AS pf1 ON (jk2d_posts.ID = pf1.post_id)
WHERE jk2d_posts.post_type = “product_variation”
AND jk2d_posts.post_status != “trash”
AND pf1.meta_key IN (“attribute_pa_color”) AND pf1.meta_value IN (“silver”)
GROUP BY jk2d_posts.id
) as filtered_post
INNER JOIN
(
SELECT ID, MAX(meta_count) as max_meta_count FROM
(
SELECT jk2d_posts.id as var_id, jk2d_posts.post_parent as ID, COUNT(jk2d_posts.id) as meta_count FROM jk2d_posts
INNER JOIN jk2d_postmeta AS pf1 ON (jk2d_posts.ID = pf1.post_id)
WHERE jk2d_posts.post_type = “product_variation”
AND pf1.meta_key IN (“attribute_pa_color”) AND pf1.meta_value IN (“silver”)
GROUP BY jk2d_posts.id
) as max_filtered_post
GROUP BY ID
) as max_filtered_post ON max_filtered_post.ID = filtered_post.ID AND max_filtered_post.max_meta_count = filtered_post.meta_count
LEFT JOIN
(
SELECT wp_posts.id as id, COALESCE(stock_table_init.out_of_stock_init1, “0”) as out_of_stock_init
FROM wp_posts
LEFT JOIN (
SELECT jk2d_posts.id as id, “1” as out_of_stock_init1
FROM jk2d_posts
WHERE jk2d_posts.id IN
(
SELECT object_id FROM jk2d_term_relationships
WHERE term_taxonomy_id IN ( 10 )
)
) as stock_table_init on wp_posts.id = stock_table_init.id
GROUP BY id
) as stock_table
ON filtered_post.var_id = stock_table.id
GROUP BY filtered_post.ID, out_of_stock
) as filtered_post
GROUP BY filtered_post.ID
HAVING post_count = 1 AND out_of_stock = 1
made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/vantage-child/woocommerce/archive-product.php’), do_shortcode, preg_replace_callback, do_shortcode_tag, BeRocket_AAPF_single_filter->shortcode, the_widget, BeRocket_new_AAPF_Widget_single->widget, the_widget, BeRocket_AAPF_Widget->widget, BeRocket_AAPF_Widget::get_attribute_values, apply_filters(‘berocket_add_out_of_stock_variable’), WP_Hook->apply_filters, BeRocket_AAPF_compat_woocommerce_variation::out_of_stock_variable
[01-May-2019 16:04:33 UTC] WordPress database error Table ‘database_name.wp_posts’ doesn’t exist for query
SELECT filtered_post.id, filtered_post.out_of_stock, COUNT(filtered_post.ID) as post_count FROM
(
SELECT filtered_post.*, max_filtered_post.max_meta_count, stock_table.out_of_stock_init as out_of_stock FROM
(
SELECT jk2d_posts.id as var_id, jk2d_posts.post_parent as ID, COUNT(jk2d_posts.id) as meta_count FROM jk2d_posts
INNER JOIN jk2d_postmeta AS pf1 ON (jk2d_posts.ID = pf1.post_id)
WHERE jk2d_posts.post_type = “product_variation”
AND jk2d_posts.post_status != “trash”
AND pf1.meta_key IN (“attribute_pa_color”) AND pf1.meta_value IN (“yellow”)
GROUP BY jk2d_posts.id
) as filtered_post
INNER JOIN
(
SELECT ID, MAX(meta_count) as max_meta_count FROM
(
SELECT jk2d_posts.id as var_id, jk2d_posts.post_parent as ID, COUNT(jk2d_posts.id) as meta_count FROM jk2d_posts
INNER JOIN jk2d_postmeta AS pf1 ON (jk2d_posts.ID = pf1.post_id)
WHERE jk2d_posts.post_type = “product_variation”
AND pf1.meta_key IN (“attribute_pa_color”) AND pf1.meta_value IN (“yellow”)
GROUP BY jk2d_posts.id
) as max_filtered_post
GROUP BY ID
) as max_filtered_post ON max_filtered_post.ID = filtered_post.ID AND max_filtered_post.max_meta_count = filtered_post.meta_count
LEFT JOIN
(
SELECT wp_posts.id as id, COALESCE(stock_table_init.out_of_stock_init1, “0”) as out_of_stock_init
FROM wp_posts
LEFT JOIN (
SELECT jk2d_posts.id as id, “1” as out_of_stock_init1
FROM jk2d_posts
WHERE jk2d_posts.id IN
(
SELECT object_id FROM jk2d_term_relationships
WHERE term_taxonomy_id IN ( 10 )
)
) as stock_table_init on wp_posts.id = stock_table_init.id
GROUP BY id
) as stock_table
ON filtered_post.var_id = stock_table.id
GROUP BY filtered_post.ID, out_of_stock
) as filtered_post
GROUP BY filtered_post.ID
HAVING post_count = 1 AND out_of_stock = 1
made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/vantage-child/woocommerce/archive-product.php’), do_shortcode, preg_replace_callback, do_shortcode_tag, BeRocket_AAPF_single_filter->shortcode, the_widget, BeRocket_new_AAPF_Widget_single->widget, the_widget, BeRocket_AAPF_Widget->widget, BeRocket_AAPF_Widget::get_attribute_values, apply_filters(‘berocket_add_out_of_stock_variable’), WP_Hook->apply_filters, BeRocket_AAPF_compat_woocommerce_variation::out_of_stock_variableI am getting this when I enable WP debug. The filter works correctly itself.
Thanks.
- The topic ‘WordPress database error’ is closed to new replies.