Project

General

Profile

Actions

Bug #90542

closed

invertStateDisplay not evaluated in flexforms

Added by B. Kausch about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2020-02-26
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.4
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

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

Actions #1

Updated by B. Kausch about 4 years ago

Of course it should read: Because flexform values are strings, the comparison evaluates to false.

Actions #2

Updated by Georg Ringer about 4 years ago

  • Description updated (diff)
  • Status changed from New to Accepted

changed description

Actions #3

Updated by Gerrit Code Review about 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

Actions #4

Updated by Gerrit Code Review about 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

Actions #5

Updated by Christian Eßl about 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Benni Mack about 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF