Elasticsuite: Fatal error: Call to a member function getCategorySearchQuery() on null vendor/smile/elasticsuite/src/module-elasticsuite-virtual-category/Model/Layer/Filter/Category.php on line 98

Created on 14 Nov 2016  路  3Comments  路  Source: Smile-SA/elasticsuite

I got Fatal error on M2.1.2 and "Smile_ES' 2.2.2.
Issue come if 'catalog category flat data' == enabled. (all ok if has disabled)

smile/elasticsuite/src/module-elasticsuite-virtual-category/Model/Layer/Filter/Category.php
96 $query = $category->getVirtualRule()->getCategorySearchQuery($category);
method on line 98 retrn wrong object.

$category->getVirtualRule()
return
string(61) "Smile\ElasticsuiteVirtualCategory\Model\Layer\Filter\Category" ('catalog category flat data' == enabled)
instead of *
"Smile\ElasticsuiteVirtualCategory\Model\Rule" *
'catalog category flat data' == disabled
)

Most helpful comment

Hey Guys,

debugged myself into this and found a possible bug/solution.
In my projekt i was extending the Magento\Catalog\Model\Category and replaced it with a

Removing this preference, clearing all caches and generated classes, this works like a charm ^^

All 3 comments

We are encountering the same issue also when flat categories are disabled.

Hey,

i can relate this issue too in version 2.6 with installed Magento 2.2.6.
I'm looking forward to get some more debug information.

Hey Guys,

debugged myself into this and found a possible bug/solution.
In my projekt i was extending the Magento\Catalog\Model\Category and replaced it with a

Removing this preference, clearing all caches and generated classes, this works like a charm ^^

Was this page helpful?
0 / 5 - 0 ratings

Related issues

susonwaiba picture susonwaiba  路  3Comments

emirajbbd picture emirajbbd  路  3Comments

ShirishRam picture ShirishRam  路  3Comments

wouter-toppy picture wouter-toppy  路  4Comments

sdasun picture sdasun  路  4Comments