Skip to content

setup:upgrade not possible in after installing Sample Data Magento 2.4.1  #30685

Closed
@NielsVroman

Description

@NielsVroman

Preconditions (*)

  1. Magento version 2.4.1
  2. PHP 7.4.11
  3. MYSQL 8.0.22
  4. ES 7.6.2

Steps to reproduce (*)

  1. Setup basic magento installation.
  2. Set Magento into Production Mode bin/magento deploy:mode:set production
  3. Install Magento Sample data using command: sampledata:deploy
  4. Use command setup:upgrade.

Expected result (*)

  1. setup upgrade activates modules and installs the sample data in the database.

Actual result (*)

Error thrown:
image

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.

In the system log:
[2020-10-28 11:12:45] main.ERROR: Sample Data error: Unable to unserialize value. Error: Syntax error [] []

Returning the string that causes the error is:
string(352) "{"type":"Magento\CatalogRule\Model\Rule\Condition\Combine","attribute":null,"operator":null,"value":"1","is_value_processed":null,"aggregator":"all","conditions":[{"type":"Magento\CatalogRule\Model\Rule\Condition\Product","attribute":"category_ids","operator":"()","value":%url_key=pants-women,url_key=pants-men%,"is_value_processed":false}]}"

When returning an empty array instead of throwing the error it continues into the next error:

Module 'Magento_ConfigurableSampleData':
Running data recurring...{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."}],"type":"illegal_argument_exception","reason":"Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."},"status":400}

Additional info from Engcom

Precondition MySQL 8

Steps to reproduce

  1. Install Magento 2.4.1 using composer create-project --repository=https://repo.magento.com/ magento/project-community-edition=2.4.1 .
  2. Deploy Sampledata bin/magento sampledata:deploy
  3. Perform Upgrade bin/magento setup:upgrade

Actual Result

Setup upgrade is aborted with an 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.
rolled_back

Metadata

Metadata

Assignees

Labels

Component: SampleDataIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.4.1Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S1Affects critical data or functionality and forces users to employ a workaround.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions