Skip to content

Instantly share code, notes, and snippets.

@junaidpv
Created February 24, 2025 11:35
Show Gist options
  • Save junaidpv/ab4cb129ca6101fd4c73c2cc8233026a to your computer and use it in GitHub Desktop.
Save junaidpv/ab4cb129ca6101fd4c73c2cc8233026a to your computer and use it in GitHub Desktop.
Workfaround fix problem reported in https://www.drupal.org/project/domain/issues/3478258 . It is assume to get fixed once https://www.drupal.org/project/domain/issues/2888033 it is closed.
diff --git a/domain_access/src/Plugin/Action/DomainAccessActionBase.php b/domain_access/src/Plugin/Action/DomainAccessActionBase.php
index dfc2b944..b61f5691 100644
--- a/domain_access/src/Plugin/Action/DomainAccessActionBase.php
+++ b/domain_access/src/Plugin/Action/DomainAccessActionBase.php
@@ -72,7 +72,7 @@ abstract class DomainAccessActionBase extends ConfigurableActionBase implements
'#type' => 'checkboxes',
'#title' => t('Domain'),
'#options' => $domains,
- '#default_value' => $this->configuration['id'],
+ '#default_value' => $this->configuration['id'] ?? [],
'#required' => TRUE,
];
return $form;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment