Review main Merged

73678[TASK] Streamline handling of TypoScript form overrides

Elias Häußler CR +2 V +2 Hard +167 −162 updated 04/27/22, 13:32

Commit message

Each form definition loaded by FormPersistenceManager can be overridden
by TypoScript. When forms are to be rendered by using the FormFrontend
controller (which should be the default way), TypoScript overrides are
applied correctly. In contrast, when using alternative ways of
rendering, it's currently impossible to override form definitions via
TypoScript.

In order to streamline the form definition management and therefore
allow a centralized way of TypoScript overriding, the appropriate
code has been moved from the FormFrontend controller to
FormPersistenceManager. This way every rendering mechanism can now make
use of the FormPersistenceManager and expect a streamlined form
definition.

Review

  • Code review CR +2 Done
    • waldhacker +2
    • Björn Jacob +1
  • Verified V +2 Done
    • waldhacker +2
    • Björn Jacob +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 1722

  1. Elias Häußler uploaded patch set 1 02/23/22, 14:34

  2. Elias Häußler updated the commit message in patch set 2 02/23/22, 14:35

  3. Elias Häußler marked it work in progress 02/23/22, 14:36

  4. Elias Häußler marked it ready for review 02/23/22, 14:43

  5. core-ci voted on patch set 1 V -1 02/23/22, 14:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24109

  6. core-ci voted on patch set 2 V -1 02/23/22, 14:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24110

  7. Elias Häußler uploaded patch set 3 02/23/22, 14:54

  8. Elias Häußler wrote 02/23/22, 14:55

    Topic set to form
  9. core-ci voted on patch set 3 V +1 02/23/22, 15:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24112

  10. Oliver Hader commented on patch set 3 CR -1 02/23/22, 16:27

    Not sure, whether this shall be back-ported to 11.5... might be okay... However, I'd like to see applying frontend TypoScript more explicitly (see my comment).

    FormPersistenceManager.php:91

    This method is invoked in frontend AND backend - I'm not sure whether it good/okay to overload things via TypoScript in that scope. In case the code shall be located here, I could imagine to make that more explicit, using a new signature, e.g. `load(string $persistenceIdentifier, int $flags = 0): array` and then ``` if ($flags & self::PROCESS_TYPOSCRIPT_SETTINGS) { $typoScript = $this->configurationManager->getConfiguration(...); $yaml = $this->overrideByTypoScriptSettings($yaml); } ```
  11. waldhacker commented on patch set 3 02/23/22, 16:52

    Reply

    I think this should not be back-portet to 11.5. And I think that's more of a TASK than a BUGFIX...
  12. Elias Häußler commented on patch set 3 02/24/22, 10:50

    FormPersistenceManager.php:91 Reply

    > This method is invoked in frontend AND backend - I'm not sure whether it good/okay to overload things via TypoScript in that scope. You're right, and I already tested this in both frontend AND backend (form editor and form manager) scope. In backend, no `formDefinitionOverrides` are available per default, since the appropriate `BackendConfigurationManager` is used. `plugin.tx_form` is therefore not available, only `module.tx_form`.
  13. Elias Häußler updated the commit message in patch set 4 02/24/22, 10:51

  14. Elias Häußler commented on patch set 4 02/24/22, 10:52

    Reply

    ack, changed it to TASK and removed backport to 11.5
  15. core-ci voted on patch set 4 V +1 02/24/22, 11:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24179

  16. Björn Jacob commented on patch set 5 04/27/22, 08:38

    Published edit on patch set 4.
  17. Björn Jacob commented on patch set 5 CR +1 04/27/22, 08:40

    FormPersistenceManager.php:91 Reply

    Done
  18. core-ci voted on patch set 5 V +1 04/27/22, 08:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26495

  19. Björn Jacob commented on patch set 5 V +1 04/27/22, 09:36

    Works like a charm.
  20. waldhacker voted on patch set 5 V +1 CR +1 04/27/22, 11:57

  21. waldhacker voted on patch set 5 V +2 CR +2 04/27/22, 13:32

  22. waldhacker merged patch set 6 04/27/22, 13:32