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

dansum’s picture

Hi there,

I figure out what is wrong in my Module Controller.

When I put :

return [
    "#markup" => "XXX"
]

The drupal_set_message works

But when I return :

return ['#type'=>'page', 'content' => ['my_custom_data' => 'xxx'];

It doesn't work => does somebody can help me to understand how the data should be returned ?

Thanks