Score:0

Twig output not styled correctly

cn flag

In one of my twig templates, I have:

<pre>{{ dump() }}</pre>

Twig output looks like:

Sfdump = window.Sfdump || (function (doc) { 

enter image description here

Controller (partial code):

$renderable = [
  '#theme' => 'child-profile',
  '#profile' => $records,
];
$output = Drupal::service('renderer')->renderPlain($renderable);
return [
  '#type' => 'markup',
  '#markup' => $output,
];

How can I get this to be styled correctly? It looks like it's outputting the javascript as text instead of executing it.

id flag
Are any Drupal debugging modules running on that site?
id flag
Also, it would be good to know what the actual markup is on that page just before and in the beginning of, the dump output.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.