Problem/Motivation

When the hook_event_dispatcher contrib. module is enabled this error is thrown, as it's using a decorator:

TypeError: Drupal\google_analytics\EventSubscriber\PagePath\ContentTranslation::__construct(): Argument #3 ($module_handler) must be of type Drupal\Core\Extension\ModuleHandler, Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler given, called in /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 in Drupal\google_analytics\EventSubscriber\PagePath\ContentTranslation->__construct() (line 62 of modules/contrib/google_analytics/src/EventSubscriber/PagePath/ContentTranslation.php).

Steps to reproduce

Enable hook_event_dispatcher module.

Proposed resolution

Use the correlated class interface instead.

Comments

droath created an issue. See original summary.

droath’s picture

droath’s picture

  • japerry committed dc50318 on 4.x
    Issue #3308742 by droath: Hook Event Dispatcher Module Errors
    
japerry’s picture

Status: Active » Fixed

Thanks for the report! Fixed.

Status: Fixed » Closed (fixed)

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