Short description of issue
Theme app extensions are injected inside HTML comments containing </body>, breaking app functionality
Reproduction steps
- Open a Shopify theme’s layout file (e.g., theme.liquid)
- Add an HTML comment anywhere at the bottom of the file before the
</body>closing tag that contains the string , for example:
<!-- ActiveCampaign Popup — paste it before </body> in theme.liquid --> - Install/enable any app that uses theme app extensions injected before the closing body tag
- Load the storefront and inspect the rendered HTML
- Observe that the theme app extension liquid markup is injected INSIDE the HTML comment (before the
</body>string within the comment), instead of before the actual</body>tag at the end of the document - If the app extension depends on the liquid content it does not execute because it is commented out
Additional info
Related to another bug where theme app extensions won’t load if users don’t close the </body> tag
Script and style tags linked in schema do not seem to be affected.
What type of topic is this
Bug report
