Liquid, JavaScript, themes, sales channels
Hello everyone, I have an odd issue happening that I'm hoping someone has seen before and knows the solution.
We had our website optimized by someone we no longer have access to. Since the optimization we've noticed that our product page's JavaScript (specifically jQuery) randomly breaks the page and product images when the page is loaded/reloaded.
I have 2 versions of the theme from different dates. One is NOT optimization (and working without breaking) and one that IS optimized (but breaking jQuery randomly).
Not Optimized but working properly (currently in production😞
https://www.leatherhoney.com/products/leather-honey-leather-conditioner
Optimized but NOT working (currently in development😞
https://leather-honey-dev.myshopify.com/products/ready-to-use-leather-cleaner
Password: LHDEV
Note: I am able to reproduce the issue with the optimized version in development + production, and have also verified they the non-optimized version works correctly in both environments as well.
I've discovered when the optimized theme randomly breaks, this is the JavaScript error (attached). When it is not broken, this error is not present. I am showing the broken version on development simply to rule out any potential application conflicts.
Here's a YouTube video I made where you can see the theme switching and reproducing the issue. The error is below.
https://youtu.be/sQdtkqEzeOw
If you know what could be causing this or what we can do to identify the issue, please let me know.
Thank you!
Non-Optimized Version that Loads Correctly (ignore errors about suspended account and optin monster):
Optimized Version that Randomly Breaks jQuery:
Solved! Go to the solution
This is an accepted solution.
Greetings!
We were able to solve this on our end. Should you find yourself running into script oddities like this, make sure your jQuery scripts link isn't set to DEFER
This is an accepted solution.
Greetings!
We were able to solve this on our end. Should you find yourself running into script oddities like this, make sure your jQuery scripts link isn't set to DEFER
User | RANK |
---|---|
33 | |
26 | |
18 | |
9 | |
9 |
Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023Summary of EventsBeginning in January of 2023, some merchants reported seeing a large amo...
By Trevor May 15, 2023