Adding an if condition on a for tag is deprecated in Twig 2.10

Created on 22 February 2023, almost 2 years ago
Updated 31 July 2023, over 1 year ago

Problem/Motivation

Using an if condition on a for tag is deprecated. This renders certain admin pages unusable in Drupal 10 which shows a white screen, logging the following error.

Twig\Error\SyntaxError: Unexpected token "name" of value "if" ("end of statement block" expected). in Twig\TokenStream->expect() (line 12 of /web/themes/contrib/mediteran/templates/admin/indentation.html.twig).

Steps to reproduce

Enable this theme and set it as the admin them. Go to a screen which uses one of the affected templates, such as a menu admin screen: /admin/structure/menu/manage/main

Proposed resolution

Change the logic in the relevant template files.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia imclean Tasmania

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

Comments & Activities

Production build 0.71.5 2024