QUALITY PATCH

MDVA-41229: Images available on the backend are not displayed on the frontend…

Images available on the backend are not displayed on the frontend after configurable products import. Quality patch MDVA-41229 for magento/module-swatches applies to Magento Open Source and Adobe Commerce 2.3.0 to 2.4.4-p18.

Categories
Content
Components
magento/module-swatches
Origin
adobe-commerce-support
Since QPT
1.1.12

Issue

Images available on the backend are not displayed on the frontend after configurable products import.

Steps to reproduce

1. Install a clean Adobe Commerce. 1. Add a custom attribute by going to Stores > Attributes > Product > Add New Attribute with the settings below: * Properties: * Attribute Properties: * Default Label: Set Size * Catalog Input Type for Store Owner: Text Swatch * Values Required: No * Update Product Preview Image: Yes * Manage Swatch (values of your attribute): | Is Default | Admin Swatch | Admin Description | Default Store View Swatch | Default Store View Description | |---|---|---|---|---| | no | 4 | 4 | 4 | 4 | | no | 24 | 24 | 24 | 24 | | no | 30 | 30 | 30 | 30 | | no | 60 | 60 | 60 | 60 | | no | 68 | 68 | 68 | 68 | * Advanced Attribute Properties: * Attribute Code: set_size * Scope: Global * Unique Value: No * Input Validation for Store Owner: None * Add to Column Options: No * Use in Filter Options: No * Manage Labels: * Manage Titles (Size, Color, etc.) * Default Store View: Set Size * Storefront Properties: * Use in Search: Yes * Search Weight: 1 * Visible in Advanced Search: No * Comparable on Storefront: Yes * Use in Layered Navigation: Filterable (with results) * Use in Search Results Layered Navigation: Yes * Use for Promo Rule Conditions: No * Visible on Catalog Pages on Storefront: Yes * Used in Product Listing: Yes * Used for Sorting in Product Listing: No 1. Add this attribute to the Default Attribute Set inside the Product Details Group (Stores > Attributes > Attribute Set). 1. Download images set into var folder inside Adobe Commerce root directory. 1. Go to System > Data Transfer > and import the file using the below options: * Import Settings: * Entity Type: Products * Import Behavior: * Import Behavior: Add/Update * Validation Strategy: Stop on Error * Allowed Errors Count: 1 * Field separator: ; * Multiple value separator: , * Attribute value constant: EMPTYVALUE * Fields enclosure: unchecked * File to Import: * Select File to Import * Images File Directory: leave it empty 1. Go to storefront to /product-set.html page and switch between different Set Sizes. For Set Size 24, there will be no gallery.

Adobe's page lists 2.3.0 - 2.4.3-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.5.

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 MDVA-41229. On Cloud, add MDVA-41229 under stage.build.QUALITY_PATCHES in .magento.env.yaml.

For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its MDVA-41229/ 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-swatches
Packages across compatible versions (1): magento/module-swatches

magento/magento2-base >=2.3.0 <2.3.4

Magento Open Source
2.3.3-p2, 2.3.3, 2.3.2-p2, 2.3.2-p1, 2.3.2, 2.3.1, 2.3.0
Adobe Commerce
2.3.3-p2, 2.3.3, 2.3.2-p2, 2.3.2-p1, 2.3.2, 2.3.1, 2.3.0
Patch file
patches/os/MDVA-41229_2.3.2-p1.patch
  • vendor/magento/module-swatches/view/frontend/web/js/swatch-renderer.js

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.