TypeError: DefaultMenuLinkTreeManipulators::__construct(): Argument #4 ($module_handler) must be of type ModuleHandlerInterface

Created on 15 November 2023, 11 months ago
Updated 6 December 2023, 10 months ago

Problem/Motivation

The site breaks on D10 due to mismatched arguments passed.

TypeError: Drupal\Core\Menu\DefaultMenuLinkTreeManipulators::__construct(): Argument #4 ($module_handler) must be of type ?Drupal\Core\Extension\ModuleHandlerInterface

Proposed resolution

Inject the module handler service to MenuItemRoleAccessLinkTreeManipulator class, then clear the Drupal's cache for the changes to take effect.

🐛 Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

🇵🇭Philippines madelyncruz

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

Comments & Activities

Production build 0.71.5 2024