Drupal Version

11.2.x

Domain module version

2.0.0-beta8

Expected Behavior

I installed domain and domain_language on 11.2 - expect this to be successful

Actual Behavior

It crashed with the error reported on #3560393: Installing Domain Language Access with Domain on 11.2 can cause problems

Steps to reproduce

Run the test in Domain Language Access module or:

  1. Install the standard profile
  2. Use Drush to install domain and domain_language at the same time

Steps to resolve

The quick fix is to do #3560393: Installing Domain Language Access with Domain on 11.2 can cause problems but the real problem is caused by using configuration to determine domain config overrides and language config overrides at the same time. This is all happening in extremely low level code. Ideally the call to the full configuration system would not happen in \Drupal\domain\DomainStorage::prepareHostname().

There are a couple of options here:
1. Expose \Drupal\domain\DomainNegotiator::$negotiating as API so that the Domain Language Access module can do an early return when this it is called during this process. this is done on 3.x already see \Drupal\domain\DomainNegotiationContext.
2. Perhaps a better solution is to not read from the configuration system here. We could use a container parameter and determine this on container build time using \Drupal\Core\Config\BootstrapConfigStorageFactory() to not invoke config overrides.

Issue fork domain-3560725

Command icon 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

alexpott created an issue. See original summary.

alexpott’s picture

Issue summary: View changes

So the good news is that Domain 3.x's \Drupal\domain\DomainNegotiationContext does part 1 of this. So that's great (well kinda because Domain Language Access needs to be updated for 3.x).

But I still think part 2 is worth doing as it will make the system less fragile.

mably made their first commit to this issue’s fork.

mably’s picture

Added a isNegotiating method to the DomainNegotiatorInterface even if already accessible via the DomainNegotiationContext service.

Not sure to understand what the problem is exactly, and how point 2 can help to fix it.

Domain records are still loaded from the configuration during the negotiation process.

mably’s picture

Status: Active » Needs review

  • mably committed 751bd48c on 3.x
    task: #3560725 Config overriding on both domain and language is complex...
mably’s picture

Status: Needs review » Fixed

I'm marking this as fixed for now.

@alexpott feel free to switch back to "Needs work" if you think we should add some extra tests.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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