-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extending swatch functionality using javascript mixins does not work in Safari and MS Edge #10559
Comments
Having the same issue on Firefox, on Chrome it works perfectly, but Firefox seems to ignore the extended file |
@lduivenvoorde ... our solution was to rewrite https://github.com/magento/magento2/blob/2.1/app/code/Magento/Swatches/view/frontend/templates/product/listing/renderer.phtml in our local theme (should work for M2 < 2.2) app/design/frontend/{COMPANY}/{THEME}/Magento_Swatches/templates/product/listing/renderer.phtml
|
Same issue for me. Firefox and Safari can't see the extended file |
Thanks @srenon!! your solution works nice also in M2.0 if you change the name of the resource
|
@srenon - Thanks for the fix!
|
@Brengineer ... take a look at PR to fix 2.2 https://github.com/magento/magento2/pull/12929/files |
@srenon, thank you for your report. |
Hi @srenon. Thank you for your report.
The fix will be available with the upcoming 2.2.5 release. |
For Magento 2.2
magento#12929 (cherry picked from commit 10c9417)
magento#12929 (cherry picked from commit 8441fbc)
Hi @srenon. Thank you for your report.
The fix will be available with the upcoming 2.3.0 release. |
Preconditions
Magento 2.1.8
Steps to reproduce
Create a custom module with mixin as describe in http://devdocs.magento.com/guides/v2.1/javascript-dev-guide/javascript/js_mixins.html for Magento_Swatches/js/swatch-renderer. Then go a category page that has products with swatches and reviews your console log in each browser to see if the "mixin" got executed. Please disable browser cache because sometimes after viewing multiple pages in Safari the mixins will get download/cached and start to work sporadically.
app/code/MagePal/SwatchExtend/view/frontend/requirejs-config.js
app/code/MagePal/SwatchExtend/view/frontend/web/js/swatch-renderer-mixin.js
Full source code to replicate the issue - https://github.com/srenon/Magento2-SwatchExtend
Expected result
Console.log() will trigger in all browser consistently
Actual result
Only work consistently in Chrome and Firefox.
Work sporadically in Safari, Mobile Safari and MS Edge (I did not test on any other browsers).
Please note: if you are testing in an extremely slow environment (i.e local dev, cache disabled etc) then it may work in safari but once you move to a faster environment it will not work anymore. So if it working consistently in Safari and your environment is in default or developer mode then switch your environment into production mode.
The text was updated successfully, but these errors were encountered: