Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Upon install I get the following related to language_manager:
The website encountered an unexpected error. Please try again later.
Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "language_manager", path: "language_request_subscriber -> language_manager -> config.factory -> domain_site_settings.overrider -> domain.negotiator". in Symfony\Component\DependencyInjection\Container->get() (line 271 of /srv/bindings/e20b9445053b47d2baa737e567d957ff/code/vendor/symfony/dependency-injection/Container.php).
Comment | File | Size | Author |
---|---|---|---|
#34 | 2930391-32.patch | 2.67 KB | dylanmehl |
#21 | 2930391-21.patch | 2.28 KB | joe_carvajal |
#16 | 2930391-16.patch | 2.23 KB | ApacheEx |
Comments
Comment #2
Yazzbe CreditAttribution: Yazzbe commentedI have the exact same problem on an existing drupal 8.4.3 installation.
The error appears after enabling the core modules language, locale + adding a new language other than English.
I was able to recreate the issue on simplytest.me
Comment #3
netsliverI have the same problem after upgrade 8.3 to 8.4 core
Comment #4
AlanHDev CreditAttribution: AlanHDev at Investis Digital commentedWe also ran into this after updating Domain module to alpha10.
By removing dependency injection for the domain negotiator, the circular error is avoided. This is probably not the best way to achieve a fix but it will allow the module to be used with domain > alpha9 and core 8.4.x
The attached patch applies to the 8.x-1.x branch but won't apply cleanly to 8.x-1.2 because of changes to the branch since the last release.
Comment #5
AlanHDev CreditAttribution: AlanHDev at Investis Digital commentedAttached patch file will apply to 8.x-1.2
Comment #6
Yazzbe CreditAttribution: Yazzbe commentedApplied the patch #5 tot 8.x-1.2 manually and the errors are gone :)
Many thanks.
Comment #7
AlanHDev CreditAttribution: AlanHDev at Investis Digital commentedThe previous patch 5 did not apply properly. I've re-rolled it and it now works properly.
This patch applies to 8.x-1.2
Comment #8
Yazzbe CreditAttribution: Yazzbe as a volunteer commentedApplied patch #7 to 8.x-1.2 and the errors are gone.
PHP 7.1
RTBC.
Comment #9
agentrickardThere are known cases where these routines run too early to reliably use dependency injection, which is why we had to introduce DomainConfigOverrider::initiateContext() in the core module suite. This change is similar in nature.
Comment #10
codesquatch CreditAttribution: codesquatch as a volunteer commentedWas having the same issue and the patch resolved it. Thanks Alan-H.
Comment #11
tim-dielsPatch working, many thanks
Comment #12
whiz11 CreditAttribution: whiz11 at Esokia commentedWhen I run composer update with the patch in composer, I get this output
This is my composer.json,
Comment #13
techwolf12 CreditAttribution: techwolf12 at Unc Inc commented@whiz11
"drupal/domain_site_settings": "^1.2"
Can you try to remove the ^ (to be sure this isn't the cause)?
Patch worked here. Though it generates the same issue on domain.negotiator now but will try to fix it
Comment #14
hlc32843163 CreditAttribution: hlc32843163 commentedPatch #7 working, thanks.
Comment #15
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedI can't seem to get this patch to apply to 8.x-1.2
git apply circular_dependency-2930391-7.patch
error: patch failed: src/Configuration/DomainConfigOverride.php:33
error: src/Configuration/DomainConfigOverride.php: patch does not apply
---
patch -p1 < circular_dependency-2930391-7.patch
patching file domain_site_settings.services.yml
patching file src/Configuration/DomainConfigOverride.php
Hunk #1 succeeded at 15 (offset -1 lines).
Hunk #2 FAILED at 26.
Hunk #3 succeeded at 50 with fuzz 2 (offset -2 lines).
1 out of 3 hunks FAILED -- saving rejects to file src/Configuration/DomainConfigOverride.php.rej
Comment #16
ApacheEx CreditAttribution: ApacheEx as a volunteer and at Internetdevels, Drupal Ukraine Community commentedHere is rerolled patch based on #7.
Comment #17
valthebaldThe latest patch applies to 1.x, but not to 1.2 (patch from #7 still works fine with 1.2). Changing the version
Comment #18
pingevt CreditAttribution: pingevt at Bluecadet commentedJust wanted to add that #7 seems to work for me on 1.2
Comment #19
vuilI received additional dependence Language_Manager issue (and the site goes down as well) after patch use, need additional work for sure.
I checked both #7 (with domain_site_settings:^1.2), and #16 (with 1.x-dev version), with all kinds of drupal/domain versions.
Drupal core is updated from 8.4.8 to both 8.5.7 & 8.6.1 - the website and drush(^9.4) is working well (without any patch) - except drush cr (cache rebuild):
"Circular reference detected for service "entity_type.manager", path: "workbench_moderation.inline_editing_disabler -> workbench_moderation.moderation_information -> entity_type.manager -> string_translation -> string_transla
tor.locale.lookup -> config.factory -> domain_site_settings.overrider -> domain.negotiator"."
After apply a patch, website goes down and drush stop working at all, showing various errors on each try of drush command execution.
I already posted an issue in domain module issues:
https://www.drupal.org/project/domain/issues/3007056
and another here: https://www.drupal.org/project/domain_site_settings/issues/3007335
Update / progress:
This patch is already working for us...
The issue was coming from "domain_language" module and its 'domain.negotiator' override!
Thanks, pals!
Comment #20
peter.thorndycraft CreditAttribution: peter.thorndycraft commentedThe patch above worked well for us until we added the replicate_ui module, we now get the error message back and the site is down and drush can't run:
Circular reference detected for service "domain.negotiator", path: "domain.negotiator".
Comment #21
joe_carvajalA new reroll, applied to the latest dev.
This one worked for me to solve the error caused on a module update.
Comment #22
kumkum29 CreditAttribution: kumkum29 commentedHello,
I get the same error when I want to delete a rules config.
D8.6.1 / Domain Site Settings 8.x-1.3
Comment #23
agentrickardTry adjusting the 'priority' of the service and see if that changes anything.
In Domain Config, the priority is set to -150 and we don't have this issue.
The tests for this module should also be updated to correct this issue.
Note that you can use Domain Config instead. It just doesn't provide a UI until https://github.com/agentrickard/domain/pull/434 is done.
Comment #24
markdc#21 is working for me. Thank you!
Comment #25
oierbravo CreditAttribution: oierbravo commented#21 working for me.
Thanks!
D8.6.10 / Domain Site Settings 8.x-1.3
Comment #26
vuilComment #27
vuilComment #28
DD 85 CreditAttribution: DD 85 commentedDrupal 8.7.5
PHP 7.1.7
Domain Site Settings 8.x-1.3
Got an error
Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "language_manager", path: "language_request_subscriber -> language_manager -> config.factory -> domain_site_settings.overrider -> domain.negotiator -> entity_type.manager -> string_translation -> string_translator.locale.lookup". in Drupal\Component\DependencyInjection\Container->get() (line 143 of core\lib\Drupal\Component\DependencyInjection\Container.php).
#21 is working for me.
Thank you!
Comment #29
rodricels CreditAttribution: rodricels commentedI suggests to change the status to "fixed" instead of "closed", because the patch isn't integrated: if you use the lastest dev version, this bug is still active :(
Comment #30
davidjguruHi,
the patch rerolled by @joe_carvajal worked like a charm in our project. Thanks a lot.
Context
-----------
Drupal Core - 8.7.8
Web Server - Nginx 1.17.4
PHP 7.3.10
Database - 5.5.5-10.3.18-MariaDB
domain_site_settings - 1.3.0
Only a little annotation:
In our scenario, the patch worked great by applying it _before_ enabling the domain_site_settings module, I mean, this require:
If not, uninstall the module (drush pmu, drupal mou), clean the dependency (composer remove drupal/domain_site_settings) and delete it (rm -rf) . Then repeat.
Greetings from Andalusia.
Comment #31
vuilComment #32
dylanmehl CreditAttribution: dylanmehl commentedHad some issues using the patches above on current stable. Made some small changes, seems to work now.
Comment #33
dylanmehl CreditAttribution: dylanmehl commentedHad some issues using the patches above on current stable. Made some small changes, seems to work now.
Comment #34
dylanmehl CreditAttribution: dylanmehl commentedHad some issues using the patches above on current stable. Made some small changes, seems to work now.
Comment #35
dylanmehl CreditAttribution: dylanmehl commentedComment #36
malaynayak CreditAttribution: malaynayak as a volunteer and commentedCommitted patch #16 to the latest dev.
Comment #37
vuil#21 works fine with the current stable (8.x-1.3) version.
Comment #38
r81d3r CreditAttribution: r81d3r as a volunteer commentedrunning on the same problem after updating to Drupal 8.9.10 with current stable (8.x-1.3) version.
as vuil already mentioned #21 works fine on my setup. #32 resulted in PHP fatal error.
I am not really shure why this bug which seems to be in the current stable version for quite a while is not fixed in an 8.x-1.4 update of this module or why this issue is marked as fixed.
Could one of the mantainers have a look at this?
Best
xx
Comment #39
valthebald@r81d3r: issues cannot be fixed in release (1.3), because releases are read-only tags.
Marking the issue as fixed in dev branch (1.x) is a correct way to track bugs (but of course, you can ask maintainers to create a new release)