0

I am facing the following issue when creating a condition to show products on the homepage using the widgets in the content manager. I am running 2.1.5 and have manually checked the files for which there was a similar issue occurring for previous version (see file locations below). All three files are up-to-date with the fix but I am still facing this issue in Magento 2.1.5.

FYI, I have also done reindexing, clean and flushed the cache, as well as static content deploy.

Error filtering template: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.b_homepage' in 'where clause'

Query was:

SELECT COUNT(DISTINCT e.entity_id) 
FROM 
    `catalog_product_flat_1` AS `e` 
    INNER JOIN `catalog_category_product_index` AS `cat_index`
    ON 
            cat_index.product_id=e.entity_id
        AND     cat_index.store_id='1' 
        AND     cat_index.visibility IN(2, 4)
        AND     cat_index.category_id='2'
    INNER JOIN
        `catalog_product_index_price` AS `price_index`
    ON
        price_index.entity_id = e.entity_id
        AND price_index.website_id = '1'
        AND price_index.customer_group_id = 0
WHERE (((IFNULL(`e`.`entity_id`, 0) IN (SELECT `catalog_category_product`.`product_id` FROM `catalog_category_product` WHERE (category_id IN ('42')))) AND(IFNULL(`e`.`b_homepage`, 0) = '1') ))

/vendor/magento/module-catalog-widget/Model/Rule/Condition Combine.php

Product.php

/vendor/magento/module-catalog-widget/Test/Unit/Model/Rule/Condition CombineTest.php

1 Answer 1

2

Solved: In regards to the attribute giving the error, I did not select the settings under 'Use in Product Listing' to 'Yes'. After I selected 'Yes' and did complete reindex the widget worked with the two conditions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.