- Issue created by @fago
- Assigned to junkuncz
- Status changed to Needs work
6 months ago 9:56am 16 May 2024 - Issue was unassigned.
- Status changed to Needs review
6 months ago 10:00am 17 May 2024 - Status changed to Needs work
6 months ago 1:45pm 17 May 2024 - 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
The currently committed code only checks
if (!empty($field_row['plugin']['settings_edit_form']['form'])) {
, so the original title has been fixed already.I believe this is a revert of some previous 'fix' - i.e. it equal to some situation last week, that had a comment saying it wasn't right. (I don't know in which issue though.) So now we are back to this previous not-right state.
This is reproducible in the UI by taking an "Authored by" (uid) field and selecting the "Formatted: author" or "Formatted: entity ID" formatter. This is showing a form button, but there is no form.
So.... changing title.
I believe the cause of the original issue is that the form definition returned in
$field_row['plugin']['settings_edit_form']['form'] = $plugin ->buildConfigurationForm($field_row['plugin']['settings_edit_form']['form'], $subform_state);
is sometimes
$configSubform = [ 'settings' => [], ]
- this cannot be fixed by checking if element_children
- doing reset() is weird.
- I believe we can just decide that the above form definition is an invalid form array -- and therefore just expect the form to be fixed, instead of making up a strange check.
New MR coming up with this new point (i.e. fixing the form definition). Tested.
- Merge request !66CoreFieldCeFieldFormatter::buildConfigurationForm() return empty form if no settings. → (Merged) created by roderik
- Status changed to Needs review
6 months ago 3:25pm 21 May 2024 - Status changed to Fixed
6 months ago 8:41am 22 May 2024 - 🇦🇹Austria fago Vienna
agreed. If a formatter returns
$configSubform = [
'settings' => [],
]then the formatter shoudl be fixed to not return an empty form like this. The MR does this just fine, thus merged. thx!
Automatically closed - issue fixed for 2 weeks with no activity.