Drupal 新手:Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException

问题描述 投票:0回答:1

我是 Drupal 的新手,我遇到了一个我很难理解的错误。我希望有人能指导我解决它。

我收到以下错误消息:

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). 
我不确定为什么会发生此错误,如果您能获得有关如何排除故障和解决该错误的帮助或指导,我将不胜感激。我正在使用 Drupal [您的 Drupal 版本],该错误似乎与 redhen_connection 模块有关。

以下是一些可能有帮助的其他详细信息:

Drupal版本:9.2.10 redhen_connection 模块版本:2.1 该网站最近有任何更改或更新吗? 我尝试了以下步骤:

  • 检查 Drupal 日志以获取更多信息。
  • 使用 drush cr 清除了 Drupal 缓存。
  • 更新了 Drupal 核心和 redhen_connection 模块。

但是,问题仍然存在。如果有人遇到类似的问题或对解决此 Symfony ServiceNotFoundException 有见解,我将非常感谢您的帮助。

谢谢!

drupal drupal-modules
1个回答
0
投票

实体查询服务已在 Drupal 8 中弃用,并在 Drupal 9 中删除。您现在需要调用

getQuery()
来实现
EntityStorageInterface

查看此更改记录 entity.query 服务已弃用,转而使用 EntityStorageInterface::getQuery() 供参考。

© www.soinside.com 2019 - 2024. All rights reserved.