Feature #99976
closedIgnore empty flexform values in extbase extension settings
100%
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:newsUtility/TypoScript
class. - Ensure, 3rd party extensions using
settings.overrideFlexformSettingsIfEmpty
are not directly affected by the new functionality by not usingsettings.overrideFlexformSettingsIfEmpty
buttx_extension_(plugin).overrideFlexformSettingsIfEmpty
- Add PSR-14 event for 3rd party extension authors to implement a custom FlexForm override process