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.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | google_analytics_hook_event_dispatcher_use_interface_3308742--3.patch | 2.29 KB | droath |
| #2 | google_analytics_hook_event_dispatcher_use_interface_3308742--2.patch | 2.37 KB | droath |
Comments
Comment #2
droath commentedComment #3
droath commentedComment #5
japerryThanks for the report! Fixed.