QUALITY PATCH

ACSD-66082: Uploading a CSV file with the swatch_image field set to EMPTY_VALUE to unset swatch…

Uploading a CSV file with the swatch_image field set to EMPTY_VALUE to unset swatch images causes the import process to fail with an error. Quality patch ACSD-66082 for magento/module-catalog-import-export applies to Magento Open Source and Adobe Commerce 2.4.6 to 2.4.8-p5.

Categories
Import/Export, Content
Components
magento/module-catalog-import-export
Origin
adobe-commerce-support
Since QPT
1.1.68

Issue

Uploading a CSV file with the swatch_image field set to EMPTY_VALUE to unset swatch images causes the import process to fail with an error.

Steps to reproduce

1. Create a simple product. Go to Catalog > Products. Click the down arrow next to the Add Product button and choose Simple Product. Set its SKU to ABC. 1. Upload a PNG image named testing.png to var/import/images/. 1. Create a CSV file with the following content: sku,swatch_image,swatch_image_label ABC,testing.png,testing 1. Go to System > Import to import the file by adjusting the following settings: * Entity type: Products * Import Behavior: Add/Update * Click Choose File to select the CSV file created in the previous step to import. The import is successful, and the swatch is added. 1. Update the CSV with the following content: sku,swatch_image,swatch_image_label ABC,__EMPTY__VALUE__,__EMPTY__VALUE__ 1. Repeat the import process.

Adobe's page lists 2.4.6 - 2.4.8-p1 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.

Adobe scheduled the permanent fix for 2.4.9.

Install

Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply ACSD-66082. On Cloud, add ACSD-66082 under stage.build.QUALITY_PATCHES in .magento.env.yaml.

For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACSD-66082/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.

Patch files and compatible versions

Packages across compatible versions (1): magento/module-catalog-import-export
Packages across compatible versions (1): magento/module-catalog-import-export

Sources

Łukasz Bajsarowicz
Built by

Łukasz Bajsarowicz, e-commerce architect

Magento and Adobe Commerce architecture, upgrades, performance and audits for merchants and agencies since 2015; magento.watch is the tooling I use on those projects.

Open source, maintained on weekends.