Last Isola Theme Update Breaks Javascript in Header
-
Hey, everyone! I’ve got Javascript that behaves in the following manner at https://lhore.com.
1. Before a theme update for Isola (now Version 1.0.5), Javascript executed just fine in the <HEAD> </HEAD> portion of header.php.
2. After the theme update for Isola, the header.php file was overwritten and now that same Javascript no longer executes.
Here’s my Javascript that ran just fine before the update.
<!-- START LOOTSIE INTEGRATION CODE --> <script> window.lootsieInit = function(){ console.log('init'); var app_key = "your-unique-key-redacted"; var achievement_id = "welcome"; loyaltyPlatform.lootsieINIT(app_key).then(function(success){ //show lootsie IAN loyaltyPlatform.lootsieACHIEVEMENT(achievement_id); }).catch(function(error){ console.log("error", error); }); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "https://browser-sdk.lootsie.com/1.0.1/js/lootsiebrowsersdk.min.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'lootsie-browser-sdk')); </script> <!-- END LOOTSIE INTEGRATION CODE -->
And here’s a video (at 2:07) where you can see exactly what that Javascript did.
I see the markup as a part of the page when I view the source, which seems correct (I’m now trying to move it in/out of the <HEAD> tag). The explanation now would seem up to how WordPress and the Isola theme now load up; why would something in the <HEAD> tag not execute, even later? The Javascript is made to execute eventually, and the service is indeed up (we’ve got it running at https://lootsie.com).
Is Isola doing something special that I must now develop around to get old, working Javascript to execute within it?
- The topic ‘Last Isola Theme Update Breaks Javascript in Header’ is closed to new replies.