- Issue created by @dieterholvoet
The following error appears when rendering a node page using this module's field formatter:
TypeError: Drupal\social_link_field\Plugin\Field\FieldFormatter\SocialLinkBaseFormatter::__construct(): Argument #10 ($module_handler) must be of type Drupal\Core\Extension\ModuleHandler, Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler given, called in /var/www/html/web/modules/contrib/social_link_field/src/Plugin/Field/FieldFormatter/SocialLinkBaseFormatter.php on line 52 in Drupal\social_link_field\Plugin\Field\FieldFormatter\SocialLinkBaseFormatter->__construct() (line 41 of modules/contrib/social_link_field/src/Plugin/Field/FieldFormatter/SocialLinkBaseFormatter.php).
Drupal\social_link_field\Plugin\Field\FieldFormatter\SocialLinkBaseFormatter::create() (Line: 65)
Drupal\Core\Field\FormatterPluginManager->createInstance() (Line: 127)
Drupal\Core\Field\FormatterPluginManager->getInstance() (Line: 205)
Drupal\Core\Entity\Entity\EntityViewDisplay->getRenderer() (Line: 241)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple() (Line: 340)
Drupal\Core\Entity\EntityViewBuilder->buildComponents() (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents() (Line: 282)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple() (Line: 239)
Drupal\Core\Entity\EntityViewBuilder->build()
Use this module in combination with Hook Event Dispatcher.
Typehint the interface instead of the class.
Active
2.0
Code