How do I print the {{messages}} variable? In Drupal 7 I was able to do something like this:

&lt;?php echo $messages; ?&gt;


It seems this variable is no more in Drupal 8.

{{messages}} // This returns NULL on {{dump(messages)}}.


I basically have a page--user--login.html.twig where I output the page.content and above that I want the messages to be displayed, in case there are errors on the page and not the entire header.

// Not desirable
{% if page.header %}
   {% block header %}
     &lt;div class="col-sm-12" role="heading"&gt;
         {{ page.header }}
      &lt;/div&gt;
   {% endblock %}
{% endif %}


What is the correct variable name for &lt;?php echo $messages ?&gt; in Drupal 8?
By default the messages are in the highlighted region, put this in your page twig:

{{ page.highlighted }}


If you changed the block layout, go to

admin/structure/block


and check in which region you placed the status message block. When it is disabled, move it back into a region.