-
Notifications
You must be signed in to change notification settings - Fork 340
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
Getting error with Admin category and all products in each category #1345
Comments
I get the same thing using
#880 was supposedly the fix for it (and/or raising php max_input_vars), but it seems that changes since may have caused a similar/new/same problem here. I temporarily commented out lines 75 to 78 of Preview.php so I can still edit categories (staying away from virtual categories of course) UPDATE: Alright, turns out that a different module was extending Magento\Catalog\Model\Category which caused the issues for me. |
Thanks @Quazz for update, could you Please elaborate how other module caused issue and solutions. Thanks |
@shrinet Because the Category model was being overwritten by another model, it wasn't returning what elasticsuite expected it to return, the data it required not being present it returns a "null" value. By commenting out the lines I mentioned, I noticed in the error log (after reloading admin category page) one particular line that caught my eye:
On a hunch I went into that module's files, opened etc/di.xml and commented out the line that replaced Magento\Catalog\Model\Category, recompiled di and everything started working. Do note that depending on the module overwriting the class, it may be necessary to take different steps. For me this works because I do not require the modified category model of that model (and it does not depend on it). For your case though, probably best to update your ElasticSuite to 2.6.7 first |
@shrinet did you investigate more ? Could you please also provide a list of third party modules you use ? So far we do not reproduce this issue on a vanilla Magento + Elasticsuite. Regards |
Thanks for your response, I did investigation and found that there was a module calling collection directly creating issue, Now I'm testing it again after removing that extension. Will update soon. Thanks |
This issue was waiting update from the author for too long. |
1 similar comment
This issue was waiting update from the author for too long. |
Quazz WE are getting the same issue now. Could you please guide what need to be done in order to fix this we are using latest version of elastic suite. |
This was a long time so I don't remember precisely, but based on my previous comment you likely have an extension that is overriding the Category or the Category Collection model. You'll have to investigate these extensions and find the one that's doing the override. |
Hello,
I am getting this errors on admin side as well as frontend, Admin side Category editing page not opening due to error and on frontend every product shows in every category.
my environment is
Preconditions
Magento Version : 2.2.7 CE
ElasticSearch Version: 5.6.15
ElasticSuite Version : 2.6.0
Environment : Production
Steps to reproduce
composer require smile/elasticsuite ~2.6.0
bin/magento module:enable Smile_ElasticsuiteCore Smile_ElasticsuiteCatalog Smile_ElasticsuiteSwatches Smile_ElasticsuiteCatalogRule Smile_ElasticsuiteVirtualCategory Smile_ElasticsuiteThesaurus Smile_ElasticsuiteCatalogOptimizer Smile_ElasticsuiteTracker
Setup config values.
Reindex everything
Expected result
Actual result
Stack Trace:
`[06-Mar-2019 22:11:12 UTC] PHP Fatal error: Uncaught Error: Call to a member function getCategorySearchQuery() on null in /vendor/smile/elasticsuite/src/module-elasticsuite-virtual-category/Model/Preview.php:105
Stack trace:
#0 /vendor/smile/elasticsuite/src/module-elasticsuite-virtual-category/Model/Preview.php(75): Smile\ElasticsuiteVirtualCategory\Model\Preview->getQueryFilter()
#1 /vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ProductSorter/AbstractPreview.php(148): Smile\ElasticsuiteVirtualCategory\Model\Preview->prepareProductCollection(Object(Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection\Interceptor))
#2 /vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ProductSorter/AbstractPreview.php(158): Smile\ElasticsuiteCatalog\Model\ProductSorter\AbstractPreview->getProductCollection()
#3 /vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ProductSorter/ in /vendor/smile/elasticsuite/src/module-elasticsuite-virtual-category/Model/Preview.php on line 105`
Please suggest
The text was updated successfully, but these errors were encountered: