Hi,
using latest version of the "domain" module, I get this error when in the domain overview page I select 'Languages' from the operations dropdown actions of a specific domain:
You have requested a non-existent service "domain.loader". Did you mean this: "domain.token"?
I believe in domain_language/src/Controller/DomainLanguageController.php this part needs to be replaced:
public function edit($domain) {
/** @var DomainLoaderInterface $domainLoader */
$domainLoader = \Drupal::service('domain.loader');
if (!$domain = $domainLoader->load($domain)) {
throw new NotFoundHttpException();
}
$build = [
'edit_form' => $this->formBuilder()->getForm(DomainLanguageForm::class, $domain),
];
return $build;
}
Maybe by this for example:
public function edit($domain) {
/** @var \Drupal\domain\Entity\Domain $domain */
$domain = \Drupal::entityTypeManager()->getStorage('domain')->load($domain);
if (is_null($domain)) {
throw new NotFoundHttpException();
}
$build = [
'edit_form' => $this->formBuilder()->getForm(DomainLanguageForm::class, $domain),
];
return $build;
}
I have these domain modules enabled:
domain (version 8.8.5)
domain_access (version 8.8.5)
domain_config (version 8.8.5)
domain_menu_access (1.x-dev)
Comments
Comment #2
flyke commentedComment #3
flyke commentedComment #4
pasug commentedSimilar to #2, But removed unused use statement,
Comment #5
rcodinaPatch on #4 works for me. Thanks!
Comment #6
dimr commentedIt works also for me the #4 patch, thanks!
Comment #7
jlbellido#4 works like a charm. Thanks!
Comment #8
rajeshreeputraWe have made the 2.0.x-dev release compatible with Drupal 9. applied the above patch as well.
use composer require 'drupal/domain_language:2.0.x-dev@dev'
A new stable release to follow shortly.