Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By dansum on
Hi there,
I don't know why but drupal_set_message doesn't seems to be rendered anymore in my theme and I really don't know why (last week it works and I didn't work on the project).
Do you have an idea where can I check what might be wrong ?
In my custom controller I have something like :
drupal_set_message('test');
return array(
'#type' => 'page',
'content' => $data->all()
);
And in my template page I have :
{{ page.highlighted }}
I have made a {{ kint() }} and the page.highlighted is empty but I trully don't know why.
Comments
Hi there,
Hi there,
I figure out what is wrong in my Module Controller.
When I put :
The drupal_set_message works
But when I return :
It doesn't work => does somebody can help me to understand how the data should be returned ?
Thanks