Problem/Motivation
Sometimes encountering the following error:
Warning: Undefined array key "id" in Drupal\domain_source\Plugin\Action\DomainSourceActionBase->buildConfigurationForm() (line 73 of modules/contrib/domain/domain_source/src/Plugin/Action/DomainSourceActionBase.php).
Steps to reproduce
Happens for me when opening the ECA Modeler.
Proposed resolution
Looks to me like the '#default_value' => $this->configuration['id'], in \Drupal\domain_source\Plugin\Action\DomainSourceActionBase::buildConfigurationForm() should be
'#default_value' => $this->configuration['domain_id'],
Remaining tasks
- ✓ Patch
- Review
- Merge
User interface changes
None
API changes
None
Data model changes
Issue fork domain-3604163
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 #3
das-peter commentedComment #5
mably commentedThanks @das-peter for reporting this and providing the fix.
I pushed a kernel test to the MR branch covering it:
DomainSourceActionFormTestbuilds thedomain_source_set_actionconfiguration form with a saveddomain_idand asserts the Domain checkboxes default to it.Verified both ways: on the current code (reading the
idkey) it fails with an "Undefined array key" warning and the default comes back as null; with the fix in place it passes. It is the first coverage of these action configuration forms, so it guards against the regression returning.Comment #7
mably commented