Project

General

Profile

Actions

Feature #99976

closed

Ignore empty flexform values in extbase extension settings

Added by Torben Hansen over 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 #1

Updated by Torben Hansen over 1 year ago

  • Related to Bug #92363: Flexform always overwrites TS-Settings in Extbase-Version added
Actions #2

Updated by Torben Hansen over 1 year ago

  • Related to Feature #61649: Extbase settings merging (TS + FlexForm) should respect ".override" and ".ifEmpty" in FlexForms added
Actions #3

Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77885

Actions #4

Updated by Torben Hansen over 1 year ago

  • Description updated (diff)
Actions #5

Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77885

Actions #6

Updated by Torben Hansen over 1 year ago

Patch 2 has a different approach than the originally intended solution. Instead of re-calculating the Framework settings after FlexForm has been merged, the new patch now excludes configured empty FlexForm fields before ConfigurationManager merges them. This results in less/better understandable code.

Actions #7

Updated by Gerrit Code Review about 1 year ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77885

Actions #8

Updated by Gerrit Code Review about 1 year ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77885

Actions #9

Updated by Gerrit Code Review about 1 year ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77885

Actions #10

Updated by Gerrit Code Review about 1 year ago

Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77885

Actions #11

Updated by Gerrit Code Review about 1 year ago

Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77885

Actions #12

Updated by Anonymous about 1 year ago

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

Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF