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

flyke created an issue. See original summary.

flyke’s picture

flyke’s picture

Version: 8.x-1.0-alpha2 » 8.x-1.x-dev
pasug’s picture

Similar to #2, But removed unused use statement,

rcodina’s picture

Patch on #4 works for me. Thanks!

dimr’s picture

Status: Active » Reviewed & tested by the community

It works also for me the #4 patch, thanks!

jlbellido’s picture

#4 works like a charm. Thanks!

rajeshreeputra’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Status: Reviewed & tested by the community » Fixed

We 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.