Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX] Handle empty values with FormEngine radio fields
The bug report #102303 indicates that a TCA element type=radio with items containing an empty string do not get properly restored/persisted in FormEngine (Backend GUI input fields). This is because empty attributes from HTML `<input>` fields are not evaluated, and thus not restored and stored properly when selected. `GeneralUtility::implodeAttributes()` calls do not utilize the `keepBlankAttributes` parameter. The report specifically mentions radio Element types, but also effects checkboxes and `<option>` tags. An option tag without a value submits the label of the option instead of an empty value, so the attribute `value=""` is important. The `CategoryElement` and `JsonElement` both already use the parameter `keepBlankAttributes`, so the older FormEngine Elements were probably not re-investigated. See #102303 on details how to test this patch. Docs [1] currently do not mention that "value" may not be an empty string. [1] https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/Radio/Properties/Items.html Resolves: #102303 Releases: main, 12.4 Change-Id: Id6a978c391dfb3781e400361e18810a037fc12a6 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81823 Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: core-ci <typo3@b13.com>
- Loading branch information