- Issue created by @philalawst
- 🇮🇳India suraj3310 Punjab
I was using drupal 11 and i got this same error on import configuration.
1. What i did is i remove the dependency of domain.record from these config files.
system.action.domain_access_all_action.yml
system.action.domain_access_edit_all_action.yml
system.action.domain_access_edit_none_action.yml
system.action.domain_access_none_action.ymlThen do the cim and it works.
2. For new set up what i did is i add the not empty condition in calculateDependencies function in DomainAccessActionBase.php file.
Below is the code
Before :
public function calculateDependencies() {
if (isset($this->configuration['domain_id'])) {
$prefix = $this->entityType->getConfigPrefix() . '.';
$this->addDependency('config', $prefix . $this->configuration['domain_id']);
}return $this->dependencies;
}After :
public function calculateDependencies() {
if (isset($this->configuration['domain_id']) && !empty($this->configuration['domain_id'])) {
$prefix = $this->entityType->getConfigPrefix() . '.';
$this->addDependency('config', $prefix . $this->configuration['domain_id']);
}return $this->dependencies;
}Then i install the domain access module.
It do not add dependency of domain record in system action configuration.
- First commit to issue fork.
- 🇺🇸United States froboy Chicago, IL
@suraj3310 has the fix here, I just committed it.
The issue is that when domain access is first installed, there are no domain records, and
$this->configuration['domain_id']
is set, but is the empty string""
, as that's what's set as the default value in the form.I'd recommend that once this change is released, the release notes contain the following:
Prior versions could generate malformed configuration if config was exported before domain records were created. To fix, search for the following in
system.action.domain_access*
files and remove it, then re-import config:config: - domain.record.
- 🇧🇪Belgium philalawst
Thanks! I remove domain.record. and reimport config. That's work
- First commit to issue fork.