Facet link giving error when added as a reference field in layout builder

Created on 4 July 2024, 6 months ago
Updated 18 September 2024, 3 months ago

Hi team,

I am using Entity reference facet link as reference field in layout builder for one of my content type.
It was working fine with Drupal 9 post Drupal 10. I am unable to use the facet link reference field and getting this error.

Drupal\entity_reference_facet_link\Plugin\Field\FieldFormatter\EntityReferenceFacetFormatterBase::__construct(): Argument #10 ($module_handler) must be of type Drupal\Core\Extension\ModuleHandler, Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler given, called in /modules/contrib/entity_reference_facet_link/src/Plugin/Field/FieldFormatter/EntityReferenceFacetFormatterBase.php on line 110 in Drupal\entity_reference_facet_link\Plugin\Field\FieldFormatter\EntityReferenceFacetFormatterBase->__construct() (line 87 of modules/contrib/entity_reference_facet_link/src/Plugin/Field/FieldFormatter/EntityReferenceFacetFormatterBase.php).

Regards
Divya

💬 Support request
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

🇮🇳India divya.lakshman

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

Comments & Activities

  • Issue created by @divya.lakshman
  • 🇺🇸United States dcam

    It looks like this is a module incompatibility problem. You're using a module called hook_event_dispatcher which overrides a service that ERFL expects. Try uninstalling the other module and see if that fixes the problem. If it works, then I will look into patching ERFL to fix the problem.

  • 🇺🇸United States dcam

    Actually, that error message doesn't make any sense. There is no argument 10 to EntityReferenceFacetFormatterBase::__construct(). There's no $module_handler variable in the entire module. Line 87 is a closing parenthesis and line 110 is a comment. Did you hack the code?

  • 🇺🇸United States dcam

    There was no further response. I'm going to assume this was a bug caused by hacking the code. Feel free to reopen it if I'm incorrect.

  • Status changed to Closed: works as designed 3 months ago
  • 🇺🇸United States dcam
Production build 0.71.5 2024