Drupal 10: Twig 3 syntax update

Created on 20 January 2023, almost 2 years ago
Updated 8 February 2023, almost 2 years ago

Original report:

When setting UI Suite Bootstrap as default theme on Drupal 10.02, the Browser Message is:
The website encountered an unexpected error.

dblog-Message about is: Twig\Error\SyntaxError: Unknown "spaceless" tag. in Twig\Parser->subparse() (line 23 of /home/pacs/chh00/htdocs/globalx/web/themes/contrib/ui_suite_bootstrap/templates/overrides/input/input--form-control.html.twig).

system-log message about is:
Twig\Parser->parse(Object) (Line: 491)
Twig\Environment->parse(Object) (Line: 519)
Twig\Environment->compileSource(Object) (Line: 132)
Drupal\Core\Template\TwigEnvironment->compileSource(Object) (Line: 351)
Twig\Environment->loadTemplate('__TwigTemplate_1fc25b5069035ee9298964bfab8d0c03', 'themes/contrib/ui_suite_bootstrap/templates/overrides/input/input--form-control.html.twig') (Line: 312)
Twig\Environment->load('themes/contrib/ui_suite_bootstrap/templates/overrides/input/input--form-control.html.twig') (Line: 53)
twig_render_template('themes/contrib/ui_suite_bootstrap/templates/overrides/input/input--form-control.html.twig', Array) (Line: 372)
Drupal\Core\Theme\ThemeManager->render('input', Array) (Line: 433)
[…]

Is this a bug ? And how to resolve. Anyone has an idea?

Updated report:

Currently deprecated Twig 2 features are used and Drupal 10 is using Twig 3 so we need to remove those deprecations.

https://twig.symfony.com/doc/2.x/deprecated.html

🐛 Bug report
Status

Fixed

Version

5.0

Component

Code

Created by

🇧🇪Belgium choy

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024