Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

App embed block javascript not showing in shop

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
8 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.