77885[FEATURE] Introduce ignoreFlexFormSettingsIfEmpty extbase configuration
Commit message
Review
-
Code review CR +2 Done
- Nikita Hovratov +2
- Georg Ringer +1
- Alexander Schnitzler +1
- Oliver Hader +1
-
Verified V +2 Done
- Nikita Hovratov +2
- Georg Ringer +1
- Alexander Schnitzler +1
- core-ci +1 CI
Issues 3
Files 7
- typo3/sysext/core/Documentation/Changelog/12.3/Feature-99976-IntroduceignoreFlexFormSettingsIfEmptyExtbaseConfiguration.rst8new+114 −0
- typo3/sysext/extbase/Classes/Configuration/FrontendConfigurationManager.php+43 −5
- typo3/sysext/extbase/Classes/Event/Configuration/BeforeFlexFormConfigurationOverrideEvent.phpnew+55 −0
- typo3/sysext/extbase/Tests/Functional/Configuration/FrontendConfigurationManagerTest.php3new+366 −0
- typo3/sysext/extbase/Tests/Unit/Configuration/FrontendConfigurationManagerTest.php+2 −0
- typo3/sysext/extbase/Tests/Unit/Event/Configuration/BeforeFlexFormConfigurationOverrideEventTest.phpnew+56 −0
- typo3/sysext/felogin/Configuration/TypoScript/setup.typoscript+12 −0
Review log 2835
Show 710 earlier messages
-
Torben Hansen uploaded patch set 1 02/17/23, 08:12
-
core-ci voted on patch set 1 V +1 02/17/23, 08:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37822
-
Georg Ringer commented on patch set 1 02/17/23, 21:07
i highly like this patch, however one important piece is missing in commit msg: overriding with an empty value can also be a desired behavior -
Torben Hansen uploaded patch set 2
V +102/18/23, 12:14 -
Torben Hansen commented on patch set 2 02/18/23, 12:18
Reply
Updated the commit message and decided to use a different approach to introduce the feature -
core-ci voted on patch set 2 V +1 02/18/23, 12:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37861
-
Georg Ringer commented on patch set 2 02/19/23, 22:13
Feature-99976-IntroduceignoreFlexFormSettingsIfEmptyExtbaseConfiguration.rst:15IMO integratorsFeature-99976-IntroduceignoreFlexFormSettingsIfEmptyExtbaseConfiguration.rst:18as I invented this feature and had several issues with empty vs zero. IMO we should not treat 0 as empty but have no personal preference - however it must be included in a test case to know if we accidently change itFeature-99976-IntroduceignoreFlexFormSettingsIfEmptyExtbaseConfiguration.rst:26especially when a setting is set by the original extension and integrators *add* a value the not often used addToList should be mentioned as example. same for nested settings with a . in the nameFeature-99976-IntroduceignoreFlexFormSettingsIfEmptyExtbaseConfiguration.rst:50not sure if this should be moved to an important rst or just be removed or kept -
Torben Hansen commented on patch set 2 02/22/23, 17:45
Feature-99976-IntroduceignoreFlexFormSettingsIfEmptyExtbaseConfiguration.rst:15ReplyIMO this affects both target groups. Changed to text accordingly.Feature-99976-IntroduceignoreFlexFormSettingsIfEmptyExtbaseConfiguration.rst:18ReplyChanged to text. Actually `""` or `"0"` are considered as empty.Feature-99976-IntroduceignoreFlexFormSettingsIfEmptyExtbaseConfiguration.rst:26ReplyDoneFeature-99976-IntroduceignoreFlexFormSettingsIfEmptyExtbaseConfiguration.rst:50ReplyI think it is good to keep the comment, since the new feature actually fixes the described problem. -
Torben Hansen uploaded patch set 3
V +102/22/23, 17:46 -
core-ci voted on patch set 3 V +1 02/22/23, 17:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37985
-
Torben Hansen wrote 03/06/23, 08:25
Topic set to extbase -
Alexander Schnitzler uploaded patch set 4
V +103/06/23, 08:37 -
Alexander Schnitzler voted on patch set 4 V +1 CR +1 03/06/23, 08:38
-
core-ci voted on patch set 4 V -1 03/06/23, 09:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38517
-
Torben Hansen rebased onto patch set 5
CR +1V +103/06/23, 09:09 -
Alexander Schnitzler voted on patch set 5 V +1 CR +1 03/06/23, 09:09
-
core-ci voted on patch set 5 V +1 03/06/23, 09:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38523
-
Georg Ringer voted on patch set 5 V +1 CR +1 03/06/23, 09:43
-
Nikita Hovratov commented on patch set 5 CR -1 03/06/23, 11:22
on it -
Nikita Hovratov uploaded patch set 6
CR +1V +103/06/23, 14:25 -
core-ci voted on patch set 6 V +1 03/06/23, 14:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38550
-
Nikita Hovratov voted on patch set 6 V +1 CR +1 03/06/23, 14:44
-
Oliver Hader commented on patch set 6 03/06/23, 15:24
FrontendConfigurationManagerTest.php:52From my POV, it would be fine to purge a setting, in case it's an empty string `''`. However, there might be scenarios, where zero `0` might be a valid (filled) value (e.g. `pid` allowing the root-page, `sys_language_uid` referring to the default language, `additionalFee` as an example which should be zero/disabled, ...). Thus, my suggestion is to consider values as filled if it's `0` - but only remove values in case they are blank `''` (or `null` in case we support `xsi:nil`). -
Torben Hansen commented on patch set 6 03/06/23, 15:35
FrontendConfigurationManagerTest.php:52ReplyThe `0` scenario is basically the one that makes most problems currently. In ext:felogin, the `settings.showForgotPassword` is a checkbox in FlexForm. Checkbox fields have a default value of `0` which leads to, that the TypoScript setting `settings.showForgotPassword` is never applied, if it is globally set to `1`. With the `ignoreFlexFormSettingsIfEmpty` feature, extension authors and integrators can control (opt-in feature), which FlexForm fields will be ignored (if empty or zero). So for fields, where the FlexForm `0` value scenario should be considered as valid, the corresponding settings-field should not be added to `ignoreFlexFormSettingsIfEmpty` setting. -
Georg Ringer commented on patch set 6 03/07/23, 05:58
tested with ext:tt_address disabling custom method _injectConfigurationManager configuration only worked using "plugin.tx_ttaddress_listview" but not with "plugin.tx_ttaddress" is this by intention? -
Torben Hansen commented on patch set 6 03/07/23, 06:47
Reply
Actually, both should work, since this logic of merging TS plugin settings is resolved in `FrontendConfigurationManager` before the FlexForm configuration is applied. `FrontendConfigurationManager` fetches `plugin.tx_extensionname` first and then merges it together with `plugin.tx_extensionname_pluginname` (plugin configuration overrules extension configuration). The `ignoreFlexFormSettingsIfEmpty` configuration should therefore always be merged, regardless of whether it is defined on extension or plugin basis. I tested it with ext:felogin by renaming `plugin.tx_felogin_login` to `plugin.tx_felogin` and the flexform ignore feature worked as expected. -
Nikita Hovratov uploaded patch set 7
CR +1V +103/07/23, 08:55 -
Nikita Hovratov commented on patch set 7 03/07/23, 08:57
Reply
Added more testcases with mixed extension / plugin configuration. Still green. -
core-ci voted on patch set 7 V +1 03/07/23, 09:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38583
-
Nikita Hovratov voted on patch set 7 V +1 CR +1 03/07/23, 09:08
-
Georg Ringer voted on patch set 7 V +1 CR +1 03/07/23, 09:50
-
Oliver Hader commented on patch set 7 CR +1 03/20/23, 09:14
FrontendConfigurationManagerTest.php:52ReplyThx for the explanation. Got it know 👍 -
Alexander Schnitzler voted on patch set 7 V +1 CR +1 03/20/23, 13:10
-
Nikita Hovratov voted on patch set 7 V +2 CR +2 03/20/23, 15:10
-
Nikita Hovratov merged patch set 8 03/20/23, 15:11