- Issue created by @prudloff
When enabling TranslateEntityProcessor
on a field created with the dynamic_entity_reference module, it triggers this exception:
Drupal\Component\Plugin\Exception\PluginNotFoundException:
The "" entity type does not exist.
at core/lib/Drupal/Core/Entity/EntityTypeManager.php:139
at Drupal\Core\Entity\EntityTypeManager->getDefinition(null)
(core/lib/Drupal/Core/Entity/EntityTypeManager.php:253)
at Drupal\Core\Entity\EntityTypeManager->getHandler(null, 'storage')
(core/lib/Drupal/Core/Entity/EntityTypeManager.php:192)
at Drupal\Core\Entity\EntityTypeManager->getStorage(null)
(modules/contrib/facets/src/Plugin/facets/processor/TranslateEntityProcessor.php:114)
at Drupal\facets\Plugin\facets\processor\TranslateEntityProcessor->build(object(Facet), array(object(Result), object(Result)))
(modules/contrib/facets/src/FacetManager/DefaultFacetManager.php:339)
Create a field with dynamic_entity_reference.
Add this field to a search_api index.
Create a facet for this field and check "Transform entity ID to label".
A solution would be to create a new FacetsProcessor that extends TranslateEntityProcessor and gets the entity type from each value instead of the field definition.
Active
2.0
Code