drupaldrupal-modules

New to Drupal: Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException


I'm new to Drupal, and I've encountered an error that I'm struggling to understand. I hope someone can guide me through resolving it.

I'm receiving the following error message:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The service "redhen_connection.connections" has a dependency on a non-existent service "entity.query". in Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processValue() (line 86 of /home/sahulatd/public_html/drupal.sahulatdocumentsclearing.com/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php). I'm not sure why this error is occurring, and I would appreciate any help or guidance on how to troubleshoot and resolve it. I'm using Drupal [Your Drupal Version], and the error seems related to the redhen_connection module.

Here are some additional details that might help:

Drupal Version: 9.2.10 redhen_connection Module Version: 2.1 Any recent changes or updates made to the site? I've tried the following steps:

However, the issue persists. If anyone has encountered a similar problem or has insights into resolving this Symfony ServiceNotFoundException, I would greatly appreciate your assistance.

Thank you!


Solution

  • The entity query service has been deprecated in Drupal 8 and removed in Drupal 9. You need to call getQuery() on the implementation of EntityStorageInterface now.

    See this change record entity.query service deprecated in favor of EntityStorageInterface::getQuery() for reference.