-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Preconditions:
Getting the below error while trying to install sample data and upgrading the setup in Magento 2.4.1
Error: Unable to apply data patch Magento\CatalogRuleSampleData\Setup\Patch\Data\InstallCatalogRuleSampleData for module Magento_CatalogRuleSampleData. Original exception message: Rolled back transaction has not been completed correctly.
Steps to reproduce:
Step:1 Install Magento 2.4.1 using composer and CLI
Step:2 Set to developer mode and run the sample data deploy and setup upgrade command
Commands used:
bin/magento sampledata:deploy
bin/magento setup:upgrade
Expected result:
setup:upgrade should be successful without any error and the site should be loaded with the sample data.
Actual result:
Getting the below error while trying to upgrade the setup after deploying the sample data.
Error: Unable to apply data patch Magento\CatalogRuleSampleData\Setup\Patch\Data\InstallCatalogRuleSampleData for module Magento_CatalogRuleSampleData. Original exception message: Rolled back transaction has not been completed correctly.
Environment details: I am using
ubuntu 20.04
PHP 7.3.25
apache 2.4.46
MYSQL 5.7.32
elastic search 7.6.0
Magento 2.4.1
composer 1.10.19
Recently I have installed the Magento 2.4.1 community edition in Ubuntu 20.04, Installation went correct and while I try to set sample data I got the error "Unable to apply data patch Magento\CatalogRuleSampleData\Setup\Patch\Data\InstallCatalogRuleSampleData for module Magento_CatalogRuleSampleData. Original exception message: Rolled back transaction has not been completed correctly."
I have searched about this issue and tried all the solution which have been provided
Tried solutions:
- Switch to developer mode before installing sample data
- Using MySQL 5.7
- Remove the sample data and rerun again
- Remove the corn job before installing the sample data but none of the solutions worked for me.
As a temporary fix, I have disabled the Magento_CatalogRuleSampleData Magento_SalesRuleSampleData and using the local site.
Anybody, please suggest a proper fix for this issue.