You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an issue where the template variable in the shortcode code can override other uses of this global variable in other code.
For example, our site is using s-template-{{ template.name | handle }} to set a class on the body of every page to determine what template is being loaded. We ran into an issue where sometimes the liquid above would produce nothing, and therefore scripts that targeted that class would not load in.
After talking with Shopify support and a 3rd party developer, they finally found that renaming the template variable in the shortcode.liquid file removed the issue and still allowed the shortcodes to function.
TL;DR: Please rename your template variable to something less generic in shortcode.liquid
Thanks!
The text was updated successfully, but these errors were encountered:
Hi there,
There is an issue where the
template
variable in the shortcode code can override other uses of this global variable in other code.For example, our site is using
s-template-{{ template.name | handle }}
to set a class on the body of every page to determine what template is being loaded. We ran into an issue where sometimes the liquid above would produce nothing, and therefore scripts that targeted that class would not load in.After talking with Shopify support and a 3rd party developer, they finally found that renaming the
template
variable in the shortcode.liquid file removed the issue and still allowed the shortcodes to function.TL;DR: Please rename your
template
variable to something less generic in shortcode.liquidThanks!
The text was updated successfully, but these errors were encountered: