error menu.html.twig with item class array

Created on 8 April 2024, 9 months ago

Problem/Motivation

the template got an issue with a specific variable: "item.url.options.attributes.class"
(file : dsfr/templates/navigation/menu.html.twig line 138)

The data saved can be an array instead a string.

Steps to reproduce

install "menu link attributes" module, edit a menu and add a class attribute

Proposed resolution

Test if the variable "item.url.options.attributes.class" is a string or an array.

🐛 Bug report
Status

Active

Version

2.1

Component

User interface

Created by

🇫🇷France is.manu

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

Comments & Activities

Production build 0.71.5 2024