D10 Issue: Twig\Error\SyntaxError: Unknown "spaceless" tag. in Twig\Parser->subparse()

Created on 27 June 2023, about 1 year ago
Updated 27 September 2023, 9 months ago

Problem/Motivation

Twig\Error\SyntaxError: Unknown "spaceless" tag. in Twig\Parser->subparse() (line 7 of modules/contrib/dx8_addtoany/templates/addtoany-template.html.twig).

Steps to reproduce

  1. Add AddToAny custom elements in cohesion component.
  2. Perform cohesion:rebuild
  3. Visit the page which has the AddToAny component.

Proposed resolution

Use spaceless filter instead in Drupal 8 too to help new sites become compatible with Twig 3 / Drupal 10.
https://twig.symfony.com/doc/3.x/filters/spaceless.html

Before:

{% spaceless %}

{% endspaceless %}

After:

{% apply spaceless %}

{% endapply %}
🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇳India iswariya Chennai

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

Comments & Activities

Production build 0.69.0 2024