Support » Developing with WordPress » WC error on admin ajax search product: Unknown column ” in ‘where clau

  • When I want to add products to a manual order in Woocommerce, the product search returns “no matches found”. I looked at the logs and I found this error seems to be culprit. I searched the error but every case I found, the unknown column name is defined in the log. Here it’s blank: Unknown column '' How can I investigate what’s causing it? I’m trying with TwentyTwenty and only WC activated…

    Full error: [proxy_fcgi:error] [pid 3178592] [client *:60140] AH01071: Got error 'PHP message: WordPress database error Unknown column '' in 'where clause' for query SELECT DISTINCT posts.ID as product_id, posts.post_parent as parent_id FROM wp_posts posts\n\t\t\t LEFT JOIN wp_wc_product_meta_lookup wc_product_meta_lookup ON posts.ID = wc_product_meta_lookup.product_id\n\t\t\t LEFT JOIN wp_wc_product_meta_lookup parent_wc_product_meta_lookup\n\t\t\t ON posts.post_type = 'product_variation' AND parent_wc_product_meta_lookup.product_id = posts.post_parent \n\t\t\tWHERE posts.post_type IN ('product','product_variation')\n\t\t\t AND ( ( ( posts.post_title LIKE '%chorizo%') OR ( posts.post_excerpt LIKE '%chorizo%') OR ( posts.post_content LIKE '%chorizo%' ) OR ( wc_product_meta_lookup.sku LIKE '%chorizo%' ) OR ( wc_product_meta_lookup.sku = "" AND parent_wc_product_meta_lookup.sku LIKE '%chorizo%' ) )) \n\t\t\t AND posts.post_status IN ('private','publish') \n\t\t\t\n\t\t\tORDER BY posts.post_parent ASC, posts.post_title ASC\n\t\t\t LIMIT 30 \n\t\t\t made by do_action('wp_ajax_woocommerce_json_search_products_and_varia...',

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.