PHP warning from menu twig template

Created on 23 June 2021, about 3 years ago
Updated 14 February 2023, over 1 year ago

I have a scenario where menu attributes added to menu items throws a twig template error when using a Bootstrap theme.

For example:

  • Menu 1
  • Menu 2
    • Menu 2.1
    • Menu 2.2

When I add an attributes to "Menu 2", the added attribute does display properly but twig template warning got throw on pages.

Warning message is :

Warning: explode() expects parameter 2 to be string, array given in twig_split_filter() (line 785 of vendor/twig/twig/src/Extension/CoreExtension.php).

Drupal Version: 9.1.0

Related issue: Attributes are removed from menu links

Also I am bit uncleared about this line https://git.drupalcode.org/project/bootstrap/-/commit/3b144f50#23b748238... as classes will be added as a part of preprocess.

🐛 Bug report
Status

Fixed

Version

3.0

Component

Templates

Created by

🇮🇳India revati_gawas Sawantwadi, Maharashtra

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.69.0 2024