cancel
Showing results for 
Search instead for 
Did you mean: 

CatalogSampleData error

CatalogSampleData error

After I put 

php bin/magento setup:upgrade

in SSH, at the end I get the following error:

 

Unable to apply data patch Magento\CatalogSampleData\Setup\Patch\Data\InstallCatalogSampleData for module Magento_CatalogSampleData. Original exception message: Rolled back transaction has not been completed correctly.

 

How can I solve this issue? 

4 REPLIES 4

Re: CatalogSampleData error

Hi! @alexander_jorda 

 

After seeing your error, I think the sample data module is not installed properly. Please install data by the following command.

bin/magento sampledata:deploy

Re: CatalogSampleData error

Unfortunately, not working. I get this message:

Nothing to install or update

<warning>Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.</warning>

<warning>Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.</warning>

Re: CatalogSampleData error

Same for me.

 

nginx/1.18.0

php 7.4 (FPM)

Mysql 5.7.31

Installed from scratch with composer

 

Show frontend and backend without errors. Not activate redis yet.

 

I'm desesperate.

 

$ magento deploy:mode:show         
Current application mode: developer. (Note: Environment variables may override this value.)

$ magento sampledata:deploy
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 20 installs, 0 updates, 0 removals
  - Installing magento/module-catalog-sample-data (100.4.0): Loading from cache
  - Installing magento/module-bundle-sample-data (100.4.0): Loading from cache
...
- Installing magento/sample-data-media (100.4.0): Loading from cache
<warning>Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.</warning>
<warning>Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.</warning>
<warning>Package sebastian/finder-facade is abandoned, you should avoid using it. No replacement was suggested.</warning>
Writing lock file
Generating autoload files
PHP CodeSniffer Config installed_paths set to ../../phpcompatibility/php-compatibility,../../magento/magento-coding-standard                        

$ magento setup:upgrade    
Cache cleared successfully
File system cleanup:
/home/aesa/demo/magento/generated/code/Composer
/home/aesa/demo/magento/generated/code/Dotdigitalgroup
/home/aesa/demo/magento/generated/code/Magento
...
The directory '/home/aesa/demo/magento/generated/metadata/' doesn't exist - skipping cleanup
Updating modules:
Schema creation/updates:
Module 'Magento_AdminAnalytics':
Module 'Magento_Store':
...

Module 'Magento_GroupedCatalogInventory':
Module 'Magento_GroupedImportExport':
Module 'Magento_CatalogSampleData':
Unable to apply data patch Magento\CatalogSampleData\Setup\Patch\Data\InstallCatalogSampleData for module Magento_CatalogSampleData. Original exception message: Rolled back transaction has not been completed correctly.

Re: CatalogSampleData error

Looks like a bug for Magento 2.4 versions. Found this solution:

bin/magento module:uninstall --remove-data --clear-static-content Magento_CatalogRuleSampleData Magento_SalesRuleSampleData

But not a recommended solution. As it does not contain complete sample data information.