The entity.manager service is deprecated in favour of the entity_type.manager service.
I have a Drupal 9 site and tried to setup this module but got the following error when trying to add a view via Paragraphs onto a node:
The website encountered an unexpected error. Please try again later.
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "entity.manager". in Drupal\Component\DependencyInjection\Container->get() (line 151 of core/lib/Drupal/Component/DependencyInjection/Container.php).
Drupal::service('entity.manager') (Line: 311)
Drupal\viewsreference\Plugin\Field\FieldWidget\ViewsReferenceWidget->getViewDisplays('files') (Line: 98)
Drupal\viewsreference\Plugin\Field\FieldWidget\ViewsReferenceWidget->fieldElement(Object, 0, Array, Array, Object) (Line: 31)
Drupal\viewsreference\Plugin\Field\FieldWidget\ViewsReferenceWidget->formElement(Object, 0, Array, Array, Object) (Line: 342)
Drupal\Core\Field\WidgetBase->formSingleElement(Object, 0, Array, Array, Object) (Line: 209)
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3133637-use-entity_type-service.patch | 830 bytes | dan2k3k4 |
Comments
Comment #2
dan2k3k4 commentedHere's a patch that changes to use the `entity_type.manager` service
Comment #3
skymen commented@dan2k3k4 Thanks. Works on Drupal 9.
Comment #4
joekersThanks for the patch - committing to 2.x branch.
Comment #6
joekers