Module Handler overrides breaks site

Created on 5 September 2023, about 1 year ago
Updated 6 October 2023, about 1 year ago

Problem/Motivation

For my site I need to override Drupal standard ModuleHandler. When I did it, I've faced the following exception:

 The website encountered an unexpected error. Please try again later.
TypeError: Drupal\session_limit\Services\SessionLimit::__construct(): Argument #6 ($moduleHandler) must be of type Drupal\Core\Extension\ModuleHandler, Drupal\module_name\CustomModuleHandlerClassName given, called in /app/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 in Drupal\session_limit\Services\SessionLimit->__construct() (line 119 of modules/contrib/session_limit/src/Services/SessionLimit.php).
 

Steps to reproduce

1. Install session_limit module
2. At the separate module override ModuleHandler
3. Open any site page

🐛 Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024