Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "form_mode.manager", path: "form_mode.manager -> domain.negotiator". in drupal-8.5.6/html/core/lib/Drupal/Component/DependencyInjection/Container.php:141 Stack trace:
#0 drupal-8.5.6/html/modules/contrib/form_mode_manager/src/EntityTypeInfo.php(59): Drupal\Component\DependencyInjection\Container->get('form_mode.manag...')
#1 drupal-8.5.6/html/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php(28): Drupal\form_mode_manager\EntityTypeInfo::create(Object(Drupal\Core\DependencyInjection\Container))
#2 drupal-8.5.6/html/modules/contrib/form_mode_manager/form_mode_manager.module(26): Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('Drupal\\form_mod...') #3
drupal-8.5.6/html/core/lib/Drupal/Core/Entity/EntityTypeManager.php(112): form_mode_manager_entity_type_build(Array)
Issue fork form_mode_manager-2991098
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
woprrr commentedHi @SocialNicheGuru,
Are you using Domain access or Domain module in your stack ? This module seem's to have somes problems with others plugins over the contributed modules.
If Not can you describe more specifically your problem ? Modules installed / Reproduction path ?
EDIT : @SEE : https://www.drupal.org/project/domain_site_settings/issues/2930391#comme...
Comment #3
socialnicheguru commentedremoved domain from my setup so no longer can test this.
Comment #4
woprrr commentedDomain seem's to having lot of problems with the service container... In FMM case the EntityTypeInfo service are implemented as core use her proper EntityTypeInfo object too with injection of manager. I think this error can't be due to FMM if that error was fired by plugins that can be possible because plugins are instanciated a lot in DP 8 but in entityTypeInfo that only on reconstruct of Entity types (after clear cache by example).
I close this issue but if you can reproduce again we can try to instanciate manager statically with \Drupal::services('xxxxx') instead of usage of injection system (BAD). \o/
Comment #5
dj1999 commentedI use domain module and could reproducing.
After drush updb get this message:
Comment #6
kekkisI ran into the same issue upon upgrading from drush 10.3.6 to something newer that would let me get rid of migrate_tools. I tried with version 10.6.2 and 11.1.1 and the results were identical.
But: when I uninstall either domain_config (with domain_config_ui) or form_mode_manager, the problem goes away and running
drush updbworks again without problems. The problem here being that I'm not really keen on replacing either of the modules in this project. Any further digging into this would be greatly appreciated.Comment #7
hartsak commentedHaving the same problem as kekkis above.
Circular reference detected for service "form_mode.manager", path: "form_mode.manager -> form_mode.manager".This happens when running
drush updbafter updating drush to 10.6.2 (same problem with drush 11.3.2). Also, php is updated to 8.1.
I managed to track the issue down to this file: form_mode_manager/src/FormModeManager.php
If I comment out the last row from the constructor
"drush updb" works.
And in the setFormModesToExclude() method the problem seems to be this part
I also tested this in a clean project by just enabling both Form Mode Manager and domain_config. After that running "drush updb" causes the "Circular reference" error.
Any chance to get this fixed somehow? Uninstalling form mode manager or domain config in my project doesn't seem like a viable option right now and I need to have php & drush updated too.
Comment #10
scott_euser commentedThanks for the tip in #7 - helped me get to the bottom of this. Having the constructor prepare the form modes to exclude is causing the circular reference when an update script is run that changes the modules list configuration such as
captcha_update_8906. Moving the prep of which form modes to exclude to be called on demand when its first needed solves this.Comment #11
scott_euser commentedComment #12
dinazaur commentedI had a similar issue the error was "... path: "form_mode.manger > config_split.cli > config.storage.sync
Applied a patch from the MR and it fixed the issue, hence I'm marking the issue as RTBC.
Comment #13
hartsak commentedTested the fix in a clean project and it works. Thanks @scott_euser for the fix!
Comment #15
dwwCool, looks good. Thanks! I don't really want to mess with trying to add an automated test for this. Committed and pushed to 8.x-2.x.
p.s. Saving credit to hartsak and dinazaur for reviews + testing.
Comment #16
dwwcommit 2aa306b98