- Issue created by @fizcs3
- π¬π§United Kingdom aaron.ferris
I could be wrong, but looking at the code following the error it looks as though the label should be required.
$new_group->set('id', $this->generateMachineName($new_group->label()));
- Status changed to Needs review
8 months ago 2:16pm 5 May 2024 - Status changed to Needs work
8 months ago 7:28am 7 May 2024 - π¬π§United Kingdom scott_euser
Thanks both! Unfortunately it's a bit more complicated than that - new group should only be conditionally required if an existing group is not chosen. So we need to implement the validate method of form base.
Ideally we should also extend the save method on the entity itself to throw an exception if someone attempts to create a Site Setting entity programmatically without a Group.
- π¬π§United Kingdom scott_euser
scott_euser β changed the visibility of the branch 3445275-group-label-required to hidden.
-
scott_euser β
committed 7ce96fb4 on 2.0.x
Issue #3445275: Group label required? + WSOD issue
-
scott_euser β
committed 7ce96fb4 on 2.0.x
- Status changed to Fixed
7 months ago 4:21am 5 June 2024 - π¬π§United Kingdom scott_euser
Added the validation part of this, but see also related π WSOD after upgrading from 2.0.0-alpha2 to 2.0.0-alpha3: Drupal\site_settings\Plugin\SiteSettingsLoader\FlattenedSiteSettingsLoader::groupKey(): Argument #1 ($group) must be of type string, null given Fixed . Thanks!
Automatically closed - issue fixed for 2 weeks with no activity.