TypeError: Drupal\menu_item_role_access\MenuItemRoleAccessLinkTreeManipulator::__construct(): Argument #4 ($module_handler) must be of type ?Drupal\Core\Extension\ModuleHandlerInterface, Drupal\Core\Config\ConfigManager given, called in /home/customer/www/grimsbymorris.org.uk/public_html/core/lib/Drupal/Component/DependencyInjection/Container.php on line 261 in Drupal\menu_item_role_access\MenuItemRoleAccessLinkTreeManipulator->__construct() (line 51 of modules/contrib/menu_item_role_access/src/MenuItemRoleAccessLinkTreeManipulator.php).

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nickbooth created an issue. See original summary.

liampower’s picture

Status: Active » Postponed (maintainer needs more info)

Hi @nickbooth,

I'm unable to replicate this. From the look of your error message your menu_item_role_access.info.yml may be out of date or the service may be being overridden.

If you can provide further information I will try and help you resolve it.

Thanks

nickbooth’s picture

Thanks Liam
I have been using MIRA for a long time and have never had any issue before. I am very much a hobbyist so I don't really understand the internals of Drupal as well as many. It was only this year that I finally bit the bullet and applied Composer and Drupal 10 to my sites.Since then I run composer update "drupal/*" --with-all-dependencies any time any update is required. Wonderful!
Now I'm having this problem updating MIRA from 2.1 to 2.3. I'll have to update core and other contrib separately until this issue is fixed.
As I'm far from being an expert I'm not sure what further info I should provide but I really appreciate your offer of help.

liampower’s picture

It may be that you have another service redefining menu.default_tree_manipulators again, are you able to search that in your code base and name each of the files that end in services.yml containing that string?

nickbooth’s picture

I found 174 files with filenames ending "services.yml". Only one mentioned "menu.default_tree_manipulators", namely menu_item_role_access.services.yml

littlepixiez made their first commit to this issue’s fork.

littlepixiez’s picture

Hi @nickbooth. So this issue looks like it was introduced in version 2.2 as the dependencies for the menu.default_tree_manipulators service were updated.

A cache clear should resolve this issue for you -- do you have access to drush on your terminal, to run "drush cr"?

I have added a commit to add a cache clear as an update hook, as for users who do not have access to drush will need to run update hooks to not hit this issue.

littlepixiez’s picture

Version: 8.x-2.3 » 8.x-2.2
Assigned: Unassigned » littlepixiez
Issue tags: +Clear cache
littlepixiez’s picture

Status: Postponed (maintainer needs more info) » Needs review

liampower’s picture

Assigned: littlepixiez » Unassigned
Status: Needs review » Fixed

Thank you both!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.