Bug #90542
closedinvertStateDisplay not evaluated in flexforms
100%
Description
The TCA option invertStateDisplay for checkboxes is not evaluated when used in flexforms. The reason for this is a strict comparison when rendering (see https://forge.typo3.org/projects/typo3cms-core/repository/revisions/master/entry/typo3/sysext/backend/Classes/Form/Element/CheckboxToggleElement.php#L176). Because flexform values are strings, the comparison evaluates to false.
An easy fix would be to force the invertStateDisplay value to a boolean while sanitizing: https://forge.typo3.org/projects/typo3cms-core/repository/revisions/master/entry/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaCheckboxItems.php#L131
Updated by B. Kausch over 4 years ago
Of course it should read: Because flexform values are strings, the comparison evaluates to false.
Updated by Georg Ringer over 4 years ago
- Description updated (diff)
- Status changed from New to Accepted
changed description
Updated by Gerrit Code Review over 4 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63506
Updated by Gerrit Code Review over 4 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63462
Updated by Christian Eßl over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 8c478504630d921cc4168e57135e1743b145b27a.