Problem/Motivation
The elements #default_value is assumed mandatory.
Steps to reproduce
Create a form friendly_autocomplete form element with no #default_value assigned. It will thow a notice like
Undefined index: #default_value in Drupal\friendly_autocomplete\Element\FriendlyAutocomplete::valueCallback() (line 139 of modules/custom/friendly_autocomplete/src/Element/FriendlyAutocomplete.php).
Proposed resolution
Make it optional like for example in /core/lib/Drupal/Core/Render/Element/Select.php line 174.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3226094.patch | 698 bytes | uniquename |
Issue fork friendly_autocomplete-3226094
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:
- 3226094-make-defaultvalue-optional
changes, plain diff MR !1
Comments
Comment #2
uniquename commentedComment #7
alexdmccabe