App embed block javascript not showing in shop

martabel
Shopify Partner
72 1 7

Hey, I have a app embed block and we have over 100s shops that this is working correctly. There is one custom shop that this script does not get added to the page. Only the callmethodFromScriptDotJs() is called and it does not have script.js in page.

 

The theme is debut with some custom modifications I believe.

What can cause this to happen?

 

callMethodFromScriptDotJs();

{% schema %}
{
"name": "My app block",
"target": "body",
"stylesheet": "style.css",
"javascript": "script.js"
}
{% endschema %}
Reply 1 (1)

nortonch
Shopify Partner
7 0 5

Just encountered this issue for the first time. App embed blocks get added before the closing body tag. Our merchant's theme.liquid file was missing a closing body tag, so our app embed block wasn't getting added. The solution was to simply add the missing closing body tag to the theme.liquid file.