Magento – Product List Widget

cmsmagento2widgets

I tried to add product list widget to show all the products which have a special price but it gives me the following error.

Error filtering template: Notice: unserialize(): Error at offset 298 of 329 bytes in /home/…./public_html/vendor/magento/module-widget/Helper/Conditions.php on line 34

<p>{{widget type="Magento\CatalogWidget\Block\Product\ProductsList" title="iyi" show_pager="0" products_count="10" template="product/widget/content/grid.phtml" conditions_encoded="a:2:[i:1;a:4:[s:4:type;s:50:Magento|CatalogWidget|Model|Rule|Condition|Combine;s:10:aggregator;s:3:all;s:5:value;s:1:1;s:9:new_child;s:0:``;]s:4:1--1;a:4:[s:4:type;s:50:Magento|CatalogWidget|Model|Rule|Condition|Product;s:9:attribute;s:13:special_price;s:8:operator;s:1:`&

Please suggest

My version is Magento 2.1.8

Best Answer

Any chance you have the memory limit set to anything less than 2G in the .htaccess?

You may see something like 256M, 768M, but Magento is recommending 2G.


Update

Review error and debug logs, post applicable errors to provide more information.

Logs to check:

  1. httpd logs (apache/nginx)
  2. PHP logs - such as error.log
  3. Magento's logs: ./var/log/* and ./var/report/*

update 2

Wouldnt hurt to ensure that there are not some improper characters that cannot be parsed by the serialize. Check all quotes, spaces, line terminations, etc... for any input you have inserted. You need to be sure that if you have copied code or text from somewhere that it did not contain any unsupported ascii characters.

Related Topic