Hello,
Having problems with the brand filter not displaying any products.
Example:
This Works brand/allstar-performance/
This Fails /?filter_brand=allstar-performance
I’ve rebuilt the product attributes lookup tables and cleared the cache.
I’m at a loss, the only thing i could find different between the two pages while debugging is the queries below. Note the “AND 1=0” on the query that doesnt return records.
SELECT SQL_CALC_FOUND_ROWS fkiavO09N_posts.ID
FROM fkiavO09N_posts LEFT JOIN fkiavO09N_term_relationships ON (fkiavO09N_posts.ID = fkiavO09N_term_relationships.object_id) LEFT JOIN fkiavO09N_wc_product_meta_lookup wc_product_meta_lookup ON fkiavO09N_posts.ID = wc_product_meta_lookup.product_id
WHERE 1=1 AND (
fkiavO09N_posts.ID NOT IN (
SELECT object_id
FROM fkiavO09N_term_relationships
WHERE term_taxonomy_id IN (7)
)
AND
fkiavO09N_term_relationships.term_taxonomy_id IN (1298)
) AND ((fkiavO09N_posts.post_type = 'product' AND (fkiavO09N_posts.post_status = 'publish'
OR fkiavO09N_posts.post_status = 'private')))
GROUP BY fkiavO09N_posts.ID
ORDER BY wc_product_meta_lookup.total_sales DESC, wc_product_meta_lookup.product_id DESC
LIMIT 0, 20
SELECT SQL_CALC_FOUND_ROWS fkiavO09N_posts.ID
FROM fkiavO09N_posts LEFT JOIN fkiavO09N_wc_product_meta_lookup wc_product_meta_lookup ON fkiavO09N_posts.ID = wc_product_meta_lookup.product_id
WHERE 1=1 AND (
fkiavO09N_posts.ID NOT IN (
SELECT object_id
FROM fkiavO09N_term_relationships
WHERE term_taxonomy_id IN (7)
)
) AND ((fkiavO09N_posts.post_type = 'product' AND (fkiavO09N_posts.post_status = 'publish'
OR fkiavO09N_posts.post_status = 'private'))) AND fkiavO09N_posts.ID IN ( SELECT fkiavO09N_term_relationships.object_id FROM fkiavO09N_term_relationships WHERE term_taxonomy_id IN (1296) ) AND 1=0
GROUP BY fkiavO09N_posts.ID
ORDER BY wc_product_meta_lookup.total_sales DESC, wc_product_meta_lookup.product_id DESC
LIMIT 0, 20