Twig SyntaxError: Unexpected "spaceless". Tag deprecated.

Created on 30 December 2023, 12 months ago
Updated 5 April 2024, 9 months ago

Demonstrate block regions /admin/structure/block/demo/ekam

The website encountered an unexpected error. Try again later.
Twig\Error\SyntaxError: Unexpected "spaceless" tag (expecting closing tag for the "for" tag defined near line 27). in Twig\Parser->subparse() (line 30 of themes/ekam/templates/navigation/toolbar.html.twig).

https://www.codebales.com/twigerrorsyntaxerror-unexpected-spaceless-tag
\ekam\templates\navigation\toolbar.html.twig

 * @see template_preprocess_toolbar()
 */
#}
<div{{ attributes.addClass('toolbar') }}>
  <nav{{ toolbar_attributes.addClass('toolbar-bar', 'clearfix') }}>
    <h2 class="visually-hidden">{{ toolbar_heading }}</h2>
    {% for key, tab in tabs %}
      {% set tray = trays[key] %}
      <div{{ tab.attributes.addClass('toolbar-tab') }}>
        {{ tab.link }}
        {#% spaceless %#}{% apply spaceless %}
          <div{{ tray.attributes }}>
            {% if tray.label %}
              <nav class="toolbar-lining clearfix" role="navigation" aria-label="{{ tray.label }}">
                <h3 class="toolbar-tray-name visually-hidden">{{ tray.label }}</h3>
            {% else %}
              <nav class="toolbar-lining clearfix" role="navigation">
            {% endif %}
            {{ tray.links }}
            </nav>
          </div>
        {% endapply %}{#% endspaceless %#}
      </div>
🐛 Bug report
Status

RTBC

Version

8.2

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024