Skip to content

Troubleshooting

“My placeholder renders as {key} on the storefront”

Section titled ““My placeholder renders as {key} on the storefront””

In order:

  1. Is the scope enabled? Check Settings → Extensions → Dynamic Variables. The toggle for the scope you are using (CMS / Product / Category) must be on.
  2. Is the variable active? Open the variable detail page — the Active flag must be on.
  3. Does the variable’s scope list allow this context? If the variable has any scopes set, the current scope must be in that list. An empty scope list = allowed everywhere.
  4. Does the value row exist for the current channel? If no channel-specific row exists, a global row must exist as fallback.
  5. Does the language have a translation? Empty translations fall back to the system default language. Translate explicitly to control the result.
  6. Cache. Clear the HTTP / object cache after editing a variable.

”The preview in the editor shows the wrong language”

Section titled “”The preview in the editor shows the wrong language””

The editor preview honours the admin language selector, not the storefront language. Switch the language selector on the variable detail page to verify other languages.

”Built-in variables are empty on a specific channel”

Section titled “”Built-in variables are empty on a specific channel””

Built-ins read from Settings → Basic Information with Shopware’s standard per-channel inheritance. Open Basic Information, switch to the relevant sales channel in the selector, and fill in the missing field.

  • The variable must actually be rendered on the page — if no {variable} placeholder ends up resolved, no CSS / JS is injected.
  • Check that the right value row has the CSS / JS — channel-specific rows have their own CSS / JS, separate from the global row.
  • Use browser DevTools to confirm the <style> / <script> is missing, not just blocked by a CSP.

”I see the variable rendered, but my JS doesn’t run”

Section titled “”I see the variable rendered, but my JS doesn’t run””
  • Inline <script> blocks run when parsed. If your script depends on the DOM being ready, wrap it in document.addEventListener('DOMContentLoaded', ...).
  • If you have a Content Security Policy (CSP) that disallows inline scripts, the injection will be blocked. Whitelist the plugin’s inline script or move the JS to the theme bundle.
  • Refresh the admin (hard reload).
  • Clear the admin cache: bin/console cache:clear and reload.
  • The button only attaches to instances of sw-text-editor. If you are inside a different editor component (e.g. a third-party rich text widget), the button does not appear.

Nesting is one level deep. {outer} containing {inner} works. {outer}{middle}{inner} does not — {inner} renders literally. Restructure the variable so the desired content is one level away from the outer placeholder.

”Storefront shows two different values in the same request”

Section titled “”Storefront shows two different values in the same request””

This usually means part of the content was rendered before Dynamic Variables ran. For example, a value that came from another plugin’s late-stage transformation might still contain raw {...}. Check the plugin’s subscriber priorities or render order — see Resolution order.