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.

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