2

I'm having a problem when using the attributes as filter the a catalog category view, the error is:

Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'marca_filter.value' in 'where clause', query was: INSERT INTO `search_tmp_5a46446e7dce40_69908069` SELECT `main_select`.`entity_id`, SUM(score) AS `relevance` FROM (SELECT `search_index`.`entity_id`, (((0) + (0)) * 1) AS `score` FROM `catalogsearch_fulltext_scope2` AS `search_index`
 LEFT JOIN `catalog_eav_attribute` AS `cea` ON search_index.attribute_id = cea.attribute_id
 INNER JOIN `catalog_category_product_index` AS `category_ids_index` ON search_index.entity_id = category_ids_index.product_id AND category_ids_index.store_id = '2' WHERE (category_ids_index.category_id = 4) AND (marca_filter.value  IN ('169'))) AS `main_select` GROUP BY `entity_id` ORDER BY `relevance` DESC, `entity_id` DESC

Marca is a custom attribute of type text/varchar and Magento has multiple stores.

The thing that i'm guessing that marca_filter is a alias for a table but i cannot figure it out what table is.

How can i know what table marca_filter is? To see if the column is there What could be the problem? How can i debug it more?

  • 1
    give us your collection code – Murtuza Zabuawala Dec 29 '17 at 13:51
  • 1
    Are you using any extension for the layered navigation? – Rishabh Rk Rai Dec 29 '17 at 17:38
  • I just "resolved". It was an extension which was doing a around plugin for Magento\CatalogSearch\Model\Search\IndexBuilder in which i think that it was missing the attritubte filter per store functionality. I just comented the pluging and now i can use the search – Gianni Di Falco Jan 2 '18 at 13:06
  • @Gianni Di Falco I have the same problem on magento 2.1.15, could you tell witch witch extension was a around plugin for Magento\CatalogSearch\Model\Search\IndexBuilder ? – knaim Sep 26 '18 at 12:47
  • @khadijaaitchrif Sorry i really do not remember – Gianni Di Falco Sep 26 '18 at 13:30
1

I just resolved. It was an extension which was doing a around plugin for

Magento\CatalogSearch\Model\Search\IndexBuilder

In which i think that it was missing the attribute filter per store functionality. I just commented the plugging and now i can use the search

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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