I am working on a magento project. it was working fine till today.but today when i open it its not working and following error is coming in error log
PHP Fatal error: Uncaught TypeError: Argument 1 passed to MagentoCatalogModelResourceModelProductCollection::addIsSaleableAttributeToFilter() must be of the type array or null, integer given, called in /home/olfwmbaph2hf/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php on line 1582 and defined in /home/olfwmbaph2hf/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php:2475
Stack trace:
0 /home/olfwmbaph2hf/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php(1582): MagentoCatalogModelResourceModelProductCollection->addIsSaleableAttributeToFilter(1)
1 /home/olfwmbaph2hf/public_html/app/code/Smartwave/Filterproducts/Block/Home/LatestList.php(56): MagentoCatalogModelResourceModelProductCollection->addAttributeToFilter(‘is_saleable’, 1, ‘left’)
2 /home/olfwmbaph2hf/public_html/app/code/Smartwave/Filterproducts/Block/Home/LatestList.php(33): SmartwaveFilterproductsBlockHomeLatestList->getProducts()
3 /home/olfw in /home/olfwmbaph2hf/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php on line 2475
can some please help to remove this issue
3
Answers
Try following solution mentioned here Error after indexing after upgrade to 2.3.3
to this
in in /home/olfwmbaph2hf/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php on line 1582
This is Porto theme issue with newer version so, better please installed porto theme patch from their support site and install it.
it will fix this issue.
you using Porto theme with Magento 2.3.3 you need to update the latest patch follow this link to see more detail Check more detail on this website
Do not edit core files updating this patch will solve your issue !