Circular reference detected

Created on 10 July 2023, over 1 year ago
Updated 18 September 2024, about 2 months ago

I got the WSOD with this message after I have unistalled drush on my site:

The website encountered an unexpected error. Please try again later.
Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "Drupal\Core\Logger\LoggerChannelFactoryInterface", path: "options_request_listener -> router.route_provider -> path_processor_manager -> simple_sitemap.engines.path_processor -> simple_sitemap.engines.index_now_submitter -> simple_sitemap.logger -> logger.channel.simple_sitemap -> Drupal\Core\Logger\LoggerChannelFactoryInterface -> logger.drupaltodrush -> exception.logger". in Drupal\Component\DependencyInjection\Container->get() (line 147 of core/lib/Drupal/Component/DependencyInjection/Container.php).

If I composer install drush again the error dissapears.

My config: D10.1.1, simple_sitemap Version: 4.1.6, Drush 12.1.1

The site is upgraded from D9 to D10 recently.

🐛 Bug report
Status

Closed: works as designed

Version

4.0

Component

Code

Created by

🇭🇷Croatia devad

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @devad
  • 🇩🇪Germany gbyte Berlin

    That's interesting. I've never tried running Drupal without Drush. What I just found is, when I unsinstall simple_sitemap prior to removing Drush, other exceptions from core occur. Can you confirm it on your end?

  • 🇭🇷Croatia devad

    RE: #2

    I have disabled the "Submit changes to IndexNow capable engines" checkbox and removed drush and everything works fine now. I didn't notice any other exceptions from core.

    So, it seems that the IndexNow part of the module has issue with drush only.

  • 🇧🇪Belgium f2boot

    Looks like patch suggested in #3 did if for me too

  • 🇧🇪Belgium f2boot

    Looks like the problem might be around the final logger (logger.drupaltodrush).

    For me, trace was:
    Got error 'PHP message: Uncaught PHP Exception Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException: "Circular reference detected for service "Drupal\\Core\\Logger\\LoggerChannelFactoryInterface", path: "options_request_listener -> router.route_provider -> path_processor_manager -> simple_sitemap.engines.path_processor -> simple_sitemap.engines.index_now_submitter -> simple_sitemap.logger -> logger.channel.simple_sitemap -> Drupal\\Core\\Logger\\LoggerChannelFactoryInterface -> logger.syslog -> workspaces.manager -> logger.channel.workspaces"."

    https://www.drupal.org/project/drupal/issues/3103620 🐛 Dependency on config storage causes circular reference in service container Needs review solved it for me

  • Status changed to Closed: cannot reproduce about 2 months ago
  • Status changed to Closed: works as designed about 2 months ago
  • 🇩🇪Germany gbyte Berlin

    I just checked again, I get a similar error as you, but after clearing the site's caches the error is gone. After removing drush, you can clear the site's caches by visiting /core/rebuild.php or /update.php

Production build 0.71.5 2024