Skip to content

Magento 2.3: Import fails if configurable attribute has an equal sign in its value #25188

Closed
@viniciusfabri

Description

@viniciusfabri

Preconditions (*)

  1. Magento 2.3.2 (2.3-develop also works) - PHP 7.1.26
  2. Sample data Installer

Steps to reproduce (*)

  1. Change one of the attributes used by the configurable products (Size for instance) to have an = sign in its value
  2. Export a configurable product that uses this attribute
  3. Try to import the CSV from the previous step

Expected result (*)

  1. Product should be imported correctly

Actual result (*)

  1. Product import fails

Description

This happens because when Magento is creating the product variations, it uses the equal sign as a separator, but if the attribute value has an equal sign in it, it breaks. We fixed this by adding a limit of '2' to the explode calls in these lines:
https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php#L576
https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php#L637

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions