elasticsuite: Error on Interceptor::addSortFilterParameters() in /var/ /Plugin/LayerPlugin.php:78
Hello,
if I enable this module I get a 500 error on the frontend with following error message
Fatal error: Uncaught Error: Call to undefined method Magento\Catalog\Model\ResourceModel\Product\Collection\Interceptor::addSortFilterParameters() in /var/www/xxx/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Plugin/LayerPlugin.php:78 Stack trace: #0 /var/www/xxx/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Plugin/LayerPlugin.php(59): Smile\ElasticsuiteCatalog\Plugin\LayerPlugin->setSortParams(Object(Magento\Catalog\Model\Layer\Category\Interceptor), Object(Magento\Catalog\Model\ResourceModel\Product\Collection\Interceptor)) #1 /var/www/xxx/htdocs/vendor/magento/framework/Interception/Interceptor.php(123): Smile\ElasticsuiteCatalog\Plugin\LayerPlugin->beforePrepareProductCollection(Object(Magento\Catalog\Model\Layer\Category\Interceptor), Object(Magento\Catalog\Model\ResourceModel\Product\Collection\Interceptor)) #2 /var/www/virtual/xxx/var/generation/Magento/Catalog/Model/Layer/Category/Interceptor.php(52): Magento\ in /var/www/xxx/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Plugin/LayerPlugin.php on line 78
Following Versions are used:
elasticsuite 2.3.0 and 2.3.1 magento 2.1.3 php 7
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 33 (3 by maintainers)
This error is due to the fact that the Product Collection getting catched by the Interceptor is not an “ElasticSuite Product Collection”.
This can be due to several causes :
the configuration is not set properly to use ElasticSuite as search engine. You can verify that the following parameter is correctly set : Stores > Configuration > Catalog > Catalog Search > Search Engine.
a third party module may cause troubles by overriding the Catalog Product Collection. Please try to deactivate any third party module to find which one is causing trouble. You should look for references to
\Magento\Catalog\Model\ResourceModel\Product\CollectionorMagento\CatalogSearch\Model\ResourceModel\Fulltext\Collectionin the di.xml files to see who is replacing this one.You can also check what you are getting by calling
get_classon the collection on the line just before the error occurs, to help identify which module is overriding the collection.Best regards,