The components/alert/alert.twig template contains a Twig syntax error that causes the error:
Twig\Error\SyntaxError: Unknown "endfor" tag in "bootstrap_barrio:alert" at line 79.
Steps to reproduce:
1. Use Bootstrap Barrio 5.5.x
2. Trigger a status message/alert
3. Observe Twig syntax error
Root cause:
In commit 7e4e4a8 (Issue #3485305), when removing the close button from the alert template, the closing
tag was also accidentally removed and replaced with a duplicate {% endfor %} tag.
The template has two {% for %} loops:
• Outer loop at line 32: {% for type, messages in message_list %}
• Inner loop at line 69: {% for message in messages %}
But there are three {% endfor %} tags:
• Line 76: closes inner loop (correct)
• Line 79: duplicate/extra (incorrect - should be < /div> (added a space to have this render in the description))
• Line 80: closes outer loop (correct)
Additionally, the
Proposed fix:
Remove the duplicate {% endfor %} at line 79 and add the missing
closing tag at line 78 to close the div opened at line 55.
Issue fork bootstrap_barrio-3568160
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
hussainwebComment #3
hussainwebComment #4
hussainwebComment #6
hussainwebComment #8
hatuhay commented