Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 #205

Closed
mantonuk opened this issue Nov 14, 2016 · 3 comments

Comments

@mantonuk
Copy link

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)

@martijnrmediact
Copy link

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

@ulftietze
Copy link

ulftietze commented Mar 20, 2019

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.

@ulftietze
Copy link

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 <preference .../>

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants