0

Have recently attempted to update to 2.3.7-p2 and am getting below error on reindex:

PHP Fatal error:  Uncaught Error: Call to undefined method Magento\Framework\Model\ResourceModel\Db\VersionControl\Snapshot::clear() in /var/www/magento/vendor/magento/module-eav/Model/Entity/Collection/VersionControl/AbstractCollection.php:98
Stack trace:
#0 /var/www/magento/generated/code/Magento/Customer/Model/ResourceModel/Customer/Indexer/Collection/Interceptor.php(76): Magento\Eav\Model\Entity\Collection\VersionControl\AbstractCollection->clear()
#1 /var/www/magento/vendor/magento/module-customer/Model/Indexer/Source.php(101): Magento\Customer\Model\ResourceModel\Customer\Indexer\Collection\Interceptor->clear()
#2 /var/www/magento/vendor/magento/framework/Indexer/SaveHandler/Batch.php(20): Magento\Customer\Model\Indexer\Source->getIterator()
#3 /var/www/magento/vendor/magento/framework/Indexer/SaveHandler/Grid.php(22): Magento\Framework\Indexer\SaveHandler\Batch->getItems(Object(Magento\Customer\Model\Indexer\Source), in /var/www/magento/vendor/magento/module-eav/Model/Entity/Collection/VersionControl/AbstractCollection.php on line 98

Also happens on setup upgrade step after Magento_Customer "running data recurring...".

Have tried resetting permissions, removed all modules, cleared generated folder and caches etc and problem persists.

May try going back to 2.3.7 and then back again see if that helps but there is no "clear" method in that class looking at the files. Not sure if there should be a clear method or if there is something overwriting a method in above stack trace to something that no longer exists.

Any suggestions as to why this may be happening?

1 Answer 1

0

Enable Maintenance Mode, then:

rm -rf /path-to-install-dir/generated/code/* /path-to-install-dir/generated/metadata/*

After that,

bin/magento setup:upgrade bin/magento setup:di:compile bin/magento cache:clean

If you're not in a production environment, you can clear Redis cache by running

redis-cli:flushall

You may need to update/upgrade the composer as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.