Problem/Motivation
I suddenly started getting this. since it started with scheduler I am assuming that is where the issue started.
See line 31 below and the line in scheduler is identified.
line in code:
/**
* Implements hook_cache_flush().
*/
function scheduler_cache_flush() {
\Drupal::service('scheduler.manager')->invalidatePluginCache(); <--- causing the loop
}
Error output:
Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: [error]
Circular reference detected for service "entity_type.manager", path: "scheduler.manager
-> date.formatter -> entity_type.manager -> string_translation ->
string_translator.locale.lookup -> config.factory ->
commerce_store_gateways.config_overrider -> commerce_store.current_store ->
commerce_store.chain_store_resolver -> commerce_marketplace.product_store_resolver". in
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php:146
Stack trace:
#0
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#1
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(240):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#2
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#3
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#4
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(276):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#5
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#6
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#7
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(240):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#8
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#9
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#10
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(240):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#11
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#12
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#13
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(276):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#14
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#15
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#16
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(240):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#17
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#18
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#19
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(276):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#20
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#21
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#22
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(240):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#23
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#24
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#25
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(240):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#26
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#27
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#28
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(240):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#29
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#30
/d9.2.18/html/core/lib/Drupal.php(198):
Drupal\Component\DependencyInjection\Container->get()
#31
/d9.2.18/html/modules/contrib/scheduler/scheduler.module(1138):
Drupal::service()
#32 [internal function]: scheduler_cache_flush()
#33
/d9.2.18/html/core/lib/Drupal/Core/Extension/ModuleHandler.php(403):
call_user_func_array()
#34
/d9.2.18/html/core/includes/common.inc(536):
Drupal\Core\Extension\ModuleHandler->invokeAll()
#35
/d9.2.18/html/core/includes/utility.inc(41):
drupal_flush_all_caches()
#36 phar:///usr/local/bin/drush/commands/core/cache.drush.inc(302): drupal_rebuild()
#37 phar:///usr/local/bin/drush/includes/command.inc(422): drush_cache_rebuild()
#38 phar:///usr/local/bin/drush/includes/command.inc(231): _drush_invoke_hooks()
#39 phar:///usr/local/bin/drush/includes/command.inc(199): drush_command()
#40 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch()
#41 phar:///usr/local/bin/drush/includes/preflight.inc(67):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#42 phar:///usr/local/bin/drush/includes/startup.inc(465): drush_main()
#43 phar:///usr/local/bin/drush/includes/startup.inc(369): drush_run_main()
#44 phar:///usr/local/bin/drush/drush(114): drush_startup()
#45 /usr/local/bin/drush(10): require('phar:///usr/loc...')
#46 {main}
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3276779-workaround-for-circular-reference-not-a-fix.patch | 492 bytes | socialnicheguru |
Comments
Comment #2
socialnicheguru commentedComment #3
socialnicheguru commentedComment #4
socialnicheguru commentedComment #5
socialnicheguru commentedadding a patch to comment out the function. This is NOT a fix but a short term workaround
Comment #6
jonathan1055 commentedThanks for reporting this. No one has observed this before, so I wonder why it has just started now?
Comment #7
jonathan1055 commentedThe top line in out output shows
So it is linked to the commerce module relating to commerce store.
Comment #8
jonathan1055 commentedSix months, no response, so closing (works as designed)