How to solve “Unable to apply data patch” when upgrading?
-
13-04-2021 - |
سؤال
I'm upgrading my Magento 2.3.2 to Magento 2.3.5 and I'm receiving this following error during upgrade:
Module ‘Magento_Wishlist’: Unable to apply data patch
Magento\Wishlist\Setup\Patch\Data\CleanUpData for module Magento_Wishlist. Original exception
message: Unable to unserialize value. Error: Syntax error
how could I solve it?
المحلول
Probably happening because you have bundle products in your store.
Merchants who encounter this error after installing Magento 2.3.5 should upgrade to Magento 2.3.5-p1.
Merchants who encounter this error after installing Magento 2.3.4-p1 should upgrade to Magento 2.3.4-p2.
Reference: Wishlist error during upgrade to Magento versions 2.3.4-p1 or 2.3.5.
نصائح أخرى
Getting below error at the time of bin/magento setup:upgrade
Module ‘Magento_Wishlist’: Unable to apply data patch Magento\Wishlist\Setup\Patch\Data\CleanUpData for module Magento_Wishlist. Original exception message: Unable to unserialize value. Error: Syntax error
Solution:
The simplest – delete OR move the
CleanUpData.php
file from the vendor folder
/vendor/magento/module-wishlist/Setup/Patch/Data/CleanUpData.php
Run these commands from the root directory of your store.
composer require magento/product-community-edition 2.3.5-p1 --no-update
composer update
php bin/magento setup:upgrade
php bin/magento cache:clean
php bin/magento setup:static-content:deploy -f