elasticsuite icon indicating copy to clipboard operation
elasticsuite copied to clipboard

Products widget preview in page builder shows "No products were matching your condition" if products do not assigned to default website

Open Neos2007 opened this issue 2 years ago • 6 comments

Preconditions

Magento Version : 2.4.2-p2 commerce ElasticSuite Version : 2.10.9.1 Environment : Production

Steps to reproduce

  1. Open CMS page, insert into the content field "Products" element (using PageBuilder editor).
  2. Configure the "Products" element. Set "Select Products By": "SKU". Enter SKUs of the visible on the front products which are not assigned to the Magento "default" website. Click "Save" in "Edit Products" from. image

Expected result

After editing and saving "Products" element should be rendered product widget preview with product items.

Actual result

Inside product widget content preview rendered text "No products were matching your condition" image

Additional info

After saving the CMS page, the product widget is successfully rendered on the storefront but still does not display products widget preview in the backend (displayed mentioned above message). The issue with products preview in page builder content only appeared if selected products are not assigned to the "default" website. If selected products are assigned to the default website, they are successfully rendered in products widget preview.

Neos2007 avatar Mar 24 '22 08:03 Neos2007

Any updates on this issue? I am facing the same issue on a multi-stock & multi-website setup.

Keivanph avatar Jun 03 '22 05:06 Keivanph

@Neos2007 Did you manage to fix your issue? We're facing the same thing, and I did a bit of debugging myself, however it seems to me more like an issue with Page Builder itself, not Elasticsuite.

It seems to me that while in the admin area, the preview of the widget is generated using the default store view, so if you configured a category which is assigned to another store view, this category might not be available in the default store view, hence not being rendered...

If you have more insight, please share.

slavko98 avatar Dec 23 '22 13:12 slavko98

This issue was happening in the 2.4.5 -p3 as well

Please find the additional logs to this:

[2023-09-13T14:23:25.329057+00:00] report.CRITICAL: LogicException: catalog_product index does not exist yet. Make sure everything is reindexed. in /volumes/www/Magento/site/public/vendor/smile/elasticsuite/src/module-elasticsuite-core/Index/IndexOperation.php:150 Stack trace: #0 /volumes/www/Magento/site/public/vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Request/ContainerConfiguration.php(193): Smile\ElasticsuiteCore\Index\IndexOperation->getIndexByName('catalog_product', 0) #1 /volumes/wwwMagento/site/public/vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Requ/est/ContainerConfiguration.php(94): Smile\ElasticsuiteCore\Search\Request\ContainerConfiguration->getIndex() #2 /volumes/www/Magento/site/public/vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Request/Builder.php(161): Smile\ElasticsuiteCore\Search\Request\ContainerConfiguration->getIndexName() #3 /volumes/www/Magento/site/public/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Fulltext/Collection.php(634): Smile\ElasticsuiteCore\Search\Request\Builder->create(0, 'catalog_product...', 0, 0, NULL, Array, Array, Array, Array) #4 /volumes/www/Magento/site/public/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Fulltext/Collection.php(195): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection->loadProductCounts()

www/Magento/site/public/vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Request/ContainerConfiguration.php::getIndex()

This method returns the index by name in which the 2nd param is to pass the current store ID, wherein it takes the default store id(0) - which is causing the preview issue

karthik147 avatar Sep 13 '23 15:09 karthik147

@romainruaud @vahonc

Can we get any update on this, If we get any support?

karthik147 avatar Sep 26 '23 11:09 karthik147

Any updates on the above mentioned issue?

ramki34 avatar Oct 17 '23 13:10 ramki34