Gin Toolbar incompatible with 10.2.0-beta1 - MenuActiveTrail ($menu_link_manager) must be of type Menu\MenuLinkManagerInterface, DependencyInjection\Container given

Created on 26 November 2023, about 1 year ago
Updated 19 January 2024, 11 months ago

(Opening the issue here, as this only effects the toolbar, not the wider Gin theme)

Problem/Motivation

After upgrading to 10.2.0-beta1 from the latest 10.1.6, we're encountering the following error on any page load:

Uncaught PHP Exception TypeError: "Drupal\\Core\\Menu\\MenuActiveTrail::__construct(): Argument #1 ($menu_link_manager) must be of type Drupal\\Core\\Menu\\MenuLinkManagerInterface, Drupal\\Core\\DependencyInjection\\Container given, called in /core/lib/Drupal/Component/DependencyInjection/Container.php on line 259" at /core/lib/Drupal/Core/Menu/MenuActiveTrail.php line 44

Disabling the Gin Toolbar resolves this issue site-wide,.

Steps to reproduce

Upgrade to 10.2.0-beta1, attempt to access any page with Gin Toolbar enabled.

Proposed resolution

The change made in 📌 Convert both BookNavigationCacheContext and MenuActiveTrailsCacheContext to use lazy services RTBC appears to have caused this, removing lazy: true from menu.active_trail resolves the issue, but defeats the purpose of the change.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom Hephaestus

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024