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:
- Install the standard profile
- 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 this is done on 3.x already see \Drupal\domain\DomainNegotiationContext.\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.
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
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
Comment #2
alexpottSo the good news is that Domain 3.x's
\Drupal\domain\DomainNegotiationContextdoes 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.
Comment #5
mably commentedAdded a
isNegotiatingmethod to theDomainNegotiatorInterfaceeven if already accessible via theDomainNegotiationContextservice.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.
Comment #6
mably commentedComment #8
mably commentedI'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.