Image Swatch size change not working #12647
Labels
Fixed in 2.3.x
The issue has been fixed in 2.3 release line
Issue: Clear Description
Gate 2 Passed. Manual verification of the issue description passed
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Issue: Format is valid
Gate 1 Passed. Automatic verification of issue format passed
Issue: Ready for Work
Gate 4. Acknowledged. Issue is added to backlog and ready for development
Reproduced on 2.1.x
The issue has been reproduced on latest 2.1 release
Reproduced on 2.2.x
The issue has been reproduced on latest 2.2 release
Preconditions
Steps to reproduce
Expected result
The background image used for the visual swatch has the dimensions 250x250
Actual result
The background image used for the visual swatch has the dimensions 30x20 which represents the default setting
Underlying issue
The media helper in the module Magento_Swatches loops through all, even unused, themes in an alphabetical order to apply their view configuration.
In our case loading the view configuration happened in the following order:
Each step overwrites its previous settings therefore we don't see the dimensions of the swatch image changing.
Uploading image for a visual swatch option happens here:
Magento/Swatches/Controller/Adminhtml/Iframe/Show.php#L105
generateSwatchVariations
Magento/Swatches/Helper/Media.php#L184
getImageConfig
Magento/Swatches/Helper/Media.php#L253
The problem is that the function loadRegisteredThemes returns all themes in an alphabetical order, even unused ones. It should load themes in the order they are used in frontend taking their hierarchy into account and also skip themes that are not used.
The text was updated successfully, but these errors were encountered: