Skip to content

Instantly share code, notes, and snippets.

@ChristianOellers
Last active September 19, 2023 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChristianOellers/8b6e69a544d83eb3deb0cc0d2b6ee1a1 to your computer and use it in GitHub Desktop.
Save ChristianOellers/8b6e69a544d83eb3deb0cc0d2b6ee1a1 to your computer and use it in GitHub Desktop.
TWIG dump() – Render issue fix (Shopware + Symfony). Stylus CSS can be used to hide code but show the dumps, while being attentive to this happening.
/**
* TWIG dump() sometimes leads to visible injected code shown in plain text.
* Hide script/ style tags output, but not completely, to be aware of this happening.
*
* Maybe due to some Syntax error occurring in some templates.
* This hides the boilerplate and just shows the debug.
*/
script,
style {
border: 2px solid magenta !important;
display: inline-block !important;
overflow: hidden !important;
width: 5px !important;
height: 5px !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment