Circular reference detected for service "domain.negotiator"

Created on 18 October 2018, almost 7 years ago
Updated 3 July 2025, 23 days ago

After installing domain_language I get this error.
There has been another issue for this, though it does not provide a full solution.

I found that when adding this to the initiateContext() function in DomainLanguageOverrider.php, the issue dissapears:

// Get the language context. Note that injecting the language manager
// into the service created a circular dependency error, so we load from
// the core service manager.
$this->languageManager = \Drupal::languageManager();
$this->language = $this->languageManager->getCurrentLanguage();

I provided a patch that adds this to the function.

🐛 Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

🇳🇱Netherlands boazpoolman

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024