LayeredNavigation error when using ElasticSearch
I'm using Magento 2.3.2 and the Pearl theme 1.8.5.
When I have ElasticSearch enabled along with the WeltPixel_LayeredNavigation extension, and I click on one of the categories to filter my products, the spinner icon spins for a few seconds, but nothing happens on my page. If I try to go directly to the filtered link, such as mysite.com/shop-by-category?cat=5, I get an HTTP 500 error. Looking in my PHP error log, I see this error
Uncaught Error: Call to undefined method Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection\Interceptor:getCollectionClone() in /chroot/home/ad2f5144/mysite.com/html/app/code/WeltPixel/LayeredNavigation/Model/Layer/Filter/Attribute.php:136
Stack trace:
#0 /chroot/home/ad2f5144/mysite.com/html/vendor/magento/module-layered-navigation/Block/Navigation.php(67): WeltPixel\LayeredNavigation\Model\Layer\Filter\Attribute->apply(Object(Magento\Framework\App\Request\Http))
#1 /chroot/home/ad2f5144/mysite.com/html/vendor/magento/framework/View/Element/AbstractBlock.php(283): Magento\LayeredNavigation\Block\Navigation->_prepareLayout()
#2 /chroot/home/ad2f15144/mysite.com/html/vendor/magento/framework/View/Layout/Generator/Block.php(149): Magento\Framework\View\Element\AbstractBlock->setLayout(Object(Magento\Framework\View\Layout\Interceptor))
#3 /chroot/home/ad2f5144/mysite.com/html/vendor/magento/framework/View/Layout/GeneratorPool/php(81): Magento\Framework\View\Layout\Generator\Block-> in /chroot/home/ad2f5144/mysite.com/html/app/code/WeltPixel/LayeredNavigation/Model/Layer/Filter/Attribute.php on line 136
If I use MySQL search instead of ElasticSearch, I don't get this error and the layered navigation category filter works correctly.
-
Official comment
Issues with the latest versions of Elastic Search 6.0+ are already addressed in March & April 2020 releases, try upgrading to the latest product version (v.1.9.7 - May 7, 2020) and you should receive the compatibility as well as other new features and small improvements.
Here is a list of all the changes included in the latest versions of the product:
Comment actions -
We have the same issue. We are running V2.3.2P2 and V2.3.3 with the Weltpixel version released in March. We are using Magento Commerce cloud and have ElasticSearch 6.0. The issue does not happen on lower branches using mysql search.
We have disable Weltpixel Layered Navigation but the Weltpixel code is still there and is failing due to a call to elastic search (our Senior Developer submitted a ticket with the specific code causing the issue). This only happens when there is one search result available. For example a list of products in which there is one at a Price greater than $200.
Will Weltpixel fix or do we have to use an Elastic Search version that is out of date?
-
The theme was installed in December and we have done the March update. We have received a patch and the Layered Navigation model shows that it is up to date (1.9.7). This does not fix the issue but only hides the error message. It is not possible to filter an attribute that only has a single item (i.e. >$200 has 1 item). There is an issue in the logic that our Developer has submitted through support center.
Switching search engines seems to be the only solution.
-
Zhuoyan, I found a fix that might work for you. Category --> Display Settings --> Default Product Listing Sort By. Use "Alphabetically" the filter now works.
Not ideal since when a customer lands on a category result page I prefer to have it sorted by "Most Relevant". I want control over the ordering of the listing.
Weltpixel. Please look into. It is repeatable.
Paul
-
Hello
I need support for this error,
Fatal error: Uncaught Error: Call to undefined method WeltPixel\LayeredNavigation\Model\ResourceModel\Fulltext\Collection\Interceptor::addSortFilterParameters() in /app/web/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Plugin/LayerPlugin.php:87 Stack trace: #0 /app/web/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Plugin/LayerPlugin.php(67): Smile\ElasticsuiteCatalog\Plugin\LayerPlugin->setSortParams(Object(Magento\Catalog\Model\Layer\Category\Interceptor), Object(WeltPixel\LayeredNavigation\Model\ResourceModel\Fulltext\Collection\Interceptor)) #1 /app/web/vendor/magento/framework/Interception/Interceptor.php(121): Smile\ElasticsuiteCatalog\Plugin\LayerPlugin->beforePrepareProductCollection(Object(Magento\Catalog\Model\Layer\Category\Interceptor), Object(WeltPixel\LayeredNavigation\Model\ResourceModel\Fulltext\Collection\Interceptor)) #2 /app/web/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Model\Layer\Category\Interceptor->Magento\Framework\Interception\{closure}(Obj in /app/web/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Plugin/LayerPlugin.php on line 87 -
Thanks a lot Paul for your advise. I consistently have an issue with ElasticSearch on Weltpixel pearl theme. An additional issue is that if I sort the category by Best Selling, the page taking very long to load. Also I checking my aws usage, this action consumes a lot of CPU power (probably due to the large amount of inventory and history we have). Not ideal either. Weltptixel needs to optimise this. I understand this is a totally different issue.
Please sign in to leave a comment.
Comments
10 comments