Indexing Issue with M2 CE after 2.3.3 upgrade

Hello. First technial issue with Magento that I don’t know why. Upgraded Magento to 2.3.3 yesterday, and when I’m trying to reindex, Magento can’t index ‘Catalog Search’ and gives the following error:

PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Catalog\Model\ResourceModel\Product\Collection::addIsSaleableAttributeToFilter() must be of t he type array or null, integer given, called in /home/325194.cloudwaysapps.com/xnjyrekmqf/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product/ Collection.php on line 1582 and defined in /home/325194.cloudwaysapps.com/xnjyre kmqf/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php:2475
Stack trace:
#0 /home/325194.cloudwaysapps.com/xnjyrekmqf/public_html/vendor/magento/module-c atalog/Model/ResourceModel/Product/Collection.php(1582): Magento\Catalog\Model\R esourceModel\Product\Collection->addIsSaleableAttributeToFilter(1)
#1 /home/325194.cloudwaysapps.com/xnjyrekmqf/public_html/generated/code/Magento/ Catalog/Model/ResourceModel/Product/Collection/Interceptor.php(518): Magento\Cat alog\Model\ResourceModel\Product\Collection->addAttributeToFilter(‘is_saleable’, 1, ‘left’)
#2 /home/325194.cloudwaysapps.com/xnjyrekmqf/public_htm in /home/325194.cloudway sapps.com/xnjyrekmqf/public_html/vendor/magento/module-catalog/Model/ResourceMod el/Product/Collection.php on line 2475

Anyone know why, and how to resolve it?
Thanks in advance.

I’ve never had this issue before. However, it’s entirely possible that this index is crashing due to your PHP memory_limit. Especially, if you haven’t changed anything other than upgrading Magento.

After upgrading Magento, the .htaccess file gets “reset” back to:

<IfModule mod_php7.c>
############################################
## adjust memory limit

    php_value memory_limit 756M
    php_value max_execution_time 18000

Try changing this back to to 2G:

php_value memory_limit 2G

Alternatively, if this does not help then you may be one of the first to have discovered a genuine bug in 2.3.3 that you should report to Magento here.

1 Like

Hi,

Please try setup:upgrade on your public_html directory.

php bin/magento setup:upgrade

Kind regards,

Thomas

Thanks Craig and Thomas. It turned out to be a compatibility between M2.3.3 and our theme (Porto). The Porto developers have issued a patch which resolves this issue.

Ian

Hi @rocketman you can explain what files are patched by porto ?¿?

Porto its a very ver bad Support and every update breaks my website.

Hello. If you download the latest version of Porto, there’s a patch for 2.3.3, I can’t remember what the files were that were changed, but it is just a case of uploading the patch files, running the php bin/magento setup:upgrade command in your Magento directory and reindexing and it’s solved.