magento2: mageSwatchRenderer is undefined on PDP
Preconditions and environment
- Magento version: 2.4.5-p2
- Clean installation with demo data
- Blank or Luma theme
Steps to reproduce
After setting up the fresh M2 instance with demo data
- Go to any product with swatches (size, color)
- In developer console, try to access the swatch renderer with
jQuery('[data-role=swatch-options]').data('mageSwatchRenderer')
Expected result
Swatch renderer should be initialized and data be accessible
Actual result
Swatch renderer is undefined
Additional information
I still had a clean installed M2 version 2.3.4 around, and there it’s working just fine.
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 26 (4 by maintainers)
mage-SwatchRenderer is correct widget name -> you should use that name