- Issue created by @cosmicdreams
- πΊπΈUnited States cosmicdreams Minneapolis/St. Paul
I was able to get the error to reoccur when manually enabling additional modules. This time I got a full call stack
The website encountered an unexpected error. Try again later. Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "plugin.manager.eca.action", path: "plugin.manager.eca.action -> eca.service.action". in Drupal\Component\DependencyInjection\Container->get() (line 147 of core/lib/Drupal/Component/DependencyInjection/Container.php). Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() (Line: 237) Drupal\Component\DependencyInjection\Container->createService() (Line: 177) Drupal\Component\DependencyInjection\Container->get() (Line: 72) Drupal\eca_ui\Plugin\modeler_api_model_owner\Eca::create() (Line: 21) Drupal\Core\Plugin\Factory\ContainerFactory->createInstance() (Line: 85) Drupal\Component\Plugin\PluginManagerBase->createInstance() (Line: 30) modeler_api_entity_type_build() (Line: 118) Drupal\Core\Entity\EntityTypeManager->Drupal\Core\Entity\{closure}() (Line: 315) Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 117) Drupal\Core\Entity\EntityTypeManager->findDefinitions() (Line: 213) Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 25) Drupal\Core\Plugin\DefaultPluginManager->getDefinition() (Line: 132) Drupal\Core\Entity\EntityTypeManager->getDefinition() (Line: 100) Drupal\eca\PluginManager\Action->setCacheBackend() (Line: 38) Drupal\Core\Action\ActionManager->__construct() (Line: 259) Drupal\Component\DependencyInjection\Container->createService() (Line: 177) Drupal\Component\DependencyInjection\Container->get() (Line: 430) Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() (Line: 463) Drupal\Component\DependencyInjection\Container->Drupal\Component\DependencyInjection\{closure}() (Line: 55) Drupal\Core\Plugin\CachedDiscoveryClearer->clearCachedDefinitions() (Line: 353) Drupal\Core\Extension\ModuleInstaller->doInstall() (Line: 229) Drupal\Core\Extension\ModuleInstaller->install() (Line: 83) Drupal\Core\ProxyClass\Extension\ModuleInstaller->install() (Line: 175) Drupal\system\Form\ModulesListConfirmForm->submitForm() call_user_func_array() (Line: 105) Drupal\Core\Form\FormSubmitter->executeSubmitHandlers() (Line: 43) Drupal\Core\Form\FormSubmitter->doSubmitForm() (Line: 589) Drupal\Core\Form\FormBuilder->processForm() (Line: 321) Drupal\Core\Form\FormBuilder->buildForm() (Line: 73) Drupal\Core\Controller\FormController->getContentResult() call_user_func_array() (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 600) Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183) Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76) Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53) Drupal\Core\StackMiddleware\Session->handle() (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28) Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32) Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116) Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90) Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 53) Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 715) Drupal\Core\DrupalKernel->handle() (Line: 19)
- πΊπΈUnited States cosmicdreams Minneapolis/St. Paul
A bit of issue queue sluething has uncovered that this is a recurring problem for some modules. The solution is to change the approach to lazy loading dependencies not through constructor injection but in getter injection. A practical example of this can be found in: https://www.drupal.org/project/filelog/issues/3416342 π Circular reference detected for service Fixed
- πΊπΈUnited States cosmicdreams Minneapolis/St. Paul
I was able to determine that his bug actually belongs to the eca module. Specifically the eca_ui module.
- πΊπΈUnited States cosmicdreams Minneapolis/St. Paul
cosmicdreams β changed the visibility of the branch 3517626--circular-reference to hidden.
- Merge request !4883517626: Fix circular reference error when using modeler_api. β (Merged) created by cosmicdreams
- First commit to issue fork.
-
jurgenhaas β
committed 32694167 on 3.0.x authored by
cosmicdreams β
Issue #3517626: Circular reference detected for service "plugin.manager...
-
jurgenhaas β
committed 32694167 on 3.0.x authored by
cosmicdreams β
-
jurgenhaas β
committed 328f8c48 on 3.0.x
Issue #3517626 by cosmicdreams, jurgenhaas: Circular reference detected...
-
jurgenhaas β
committed 328f8c48 on 3.0.x
- π©πͺGermany jurgenhaas Gottmadingen
Made some changes in the MR and also afterwards fixed the PHPDoc comments.
As a folllow-up, I also created an issue in modeler_api: π Optimize plugin managers Active