Change "spaceless" tag to filter

Created on 13 June 2024, 6 months ago
Updated 29 August 2024, 4 months ago

Problem/Motivation

Apparently the {% nameless %} no longer works for Twig 3. One of my Drupal 10 installations threw all kinds of php errors*

Proposed resolution

See issue 3380774 ๐Ÿ› Spaceless Tag is Deprecated in Drupal 10 Fixed and the Symfony documentation:

  • Change all spaceless tags in the templates to apply spaceless
  • Change all endspaceless tags to endapply
  • The same applies to Seven โ†’ , which also uses some Classy templates

I've no idea how to make patches, but since I've already fixed the affected local templates I can just zip them if the devs are interested.

* For Google's sake: Uncaught PHP Exception Twig\\Error\\SyntaxError: "Unexpected "spaceless" tag (expecting closing tag for the "for" tag defined near line 27)." at [path theme] toolbar.html.twig line 30'

๐Ÿ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

๐Ÿ‡ณ๐Ÿ‡ฑNetherlands zJoriz

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

Comments & Activities

Production build 0.71.5 2024