Theme preprocess hook crashed when gin toolbar is installed

Created on 7 October 2024, about 2 months ago

Problem/Motivation

This line is a root cause:
https://git.drupalcode.org/project/belgrade/-/blob/2c6c972c5a27ac73302a0...

I am getting WSOD when installing this theme along with the gin admin theme and gin toolbar. The reason for the crash is defined as follows:

Error: Call to a member function toString() on string in belgrade_preprocess_menu() (line 23 of themes/contrib/belgrade/includes/menu.inc). 

This is particularly apparent when Gin is configured to utilize "New Drupal Navigation, Test integration". When that option is selected $item['url'] can be empty or string.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇳🇴Norway zaporylie

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

Merge Requests

Comments & Activities

  • Issue created by @zaporylie
  • 🇷🇸Serbia majmunbog

    I think we can remove that whole preprocess function. The active trail class should work without it and we don't even use it in the theme CSS. With the :has() CSS selectors there's no real need to complicate and add a class to

  • elements.
  • Pipeline finished with Skipped
    12 days ago
    #336085
  • First commit to issue fork.
  • Production build 0.71.5 2024