Project

General

Profile

Actions

Feature #99976

closed

Ignore empty flexform values in extbase extension settings

Added by Torben Hansen about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Extbase
Target version:
Start date:
2023-02-17
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

When Extbase merges TypoScript and FlexForm settings, the FlexForm settings will always override TypoScript settings. Since FlexForm fields can not be nullable, this leads to the problem, that empty FlexForm settings override TypoScript settings, which in some situations is unwanted.

Example TypoScript: settings.storagePid = 1,2,3
Example FlexForm: settings.storagePage =

In the current situation, the settings in an extbase extension for settings.storagePage is empty. This prevents the usage of globally defined settings in TypoScript for settings also available in FlexForm. From TYPO3 core perspective, this is a huge problem for ext:felogin (see #92363).

3rd party extensions like ext:news implemented a custom override process for this scenario, where empty FlexForm settings are overridden by global TypoScript settings again. In TER there are currently 60 extensions which implement basically the same code as ext:news does.

The ideal solution for this problem would be to make FlexForm fields nullable (e.g. checkbox like "Use setting from TypoScript"). This is however not really an easy task and having such additional checkbox fields for each nullable FlexForm field may be confusing for editors, who may not even know something about TypoScript settings.

Fact is, that ext:felogin does not work with globally defined TypoScript settings and this problem must be resolved in some way at least for TYPO3 12 (even better for v11 too, since the felogin legacy plugin has been removed in v11).

Possible solution:
  • Implement core-wise overrideFlexformSettingsIfEmpty functionality similar to ext:news Utility/TypoScript class.
  • Ensure, 3rd party extensions using settings.overrideFlexformSettingsIfEmpty are not directly affected by the new functionality by not using settings.overrideFlexformSettingsIfEmpty but tx_extension_(plugin).overrideFlexformSettingsIfEmpty
  • Add PSR-14 event for 3rd party extension authors to implement a custom FlexForm override process

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #92363: Flexform always overwrites TS-Settings in Extbase-VersionClosed2020-09-21

Actions
Related to TYPO3 Core - Feature #61649: Extbase settings merging (TS + FlexForm) should respect ".override" and ".ifEmpty" in FlexFormsClosed2014-09-16

Actions
Actions

Also available in: Atom PDF