Review main Merged

71490[BUGFIX] Fix validation in form override settings

Nikita Hovratov CR +2 V +2 Normal +188 −2 updated 12/16/21, 22:46

Commit message

The FinisherOptionGenerator of the form extension
generates the data structure for the form setting
overrides on the fly. By doing so, it didn't make
a distinction between normal TCA fields and flexform
specific sections/containers and added the wrapper
"TCEforms" to sections as well, which broke the
validation in DataHandler for the fields inside the
container (E.g. the email field).

The patch checks if section is set to "true" and
adds the "TCEforms" key only for normal TCA field
configurations.

Unit tests have been added for the DataHandler
checkValue_flex_procInData_travDS method, which
show cases with and without the "TCEforms" key.

Also, since this works now, a PHP 8 warning
appeared. This is fixed now, too.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Christian Kuhn +1
  • Verified V +2 Done
    • Benni Mack +2
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1930

Show 35 earlier messages
  1. Nikita Hovratov uploaded patch set 1 10/07/21, 16:16

  2. core-ci voted on patch set 1 V -1 10/07/21, 16:20 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17763

  3. Nikita Hovratov uploaded patch set 2 10/07/21, 16:26

  4. core-ci voted on patch set 2 V -1 10/07/21, 16:30 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17765

  5. Nikita Hovratov uploaded patch set 3 10/07/21, 16:40

  1. core-ci voted on patch set 3 V -1 10/07/21, 16:45 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17766

  2. Nikita Hovratov uploaded patch set 4 10/07/21, 16:48

  3. core-ci voted on patch set 4 V +1 10/07/21, 17:03 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17768

  4. Wouter Wolters voted on patch set 4 CR +1 10/07/21, 17:52

  5. Christian Kuhn commented on patch set 4 10/07/21, 18:32

    weird. i roughly remember that I adapted something in this area years ago: afaik, flexFormTools resolution takes care there is *always* a sheet when a DS is parsed ... i stumbled upon that with my refactoring in https://review.typo3.org/c/Packages/TYPO3.CMS/+/71097 recently. I don't say you're not right here, but I think this detail needs a good review.
  6. Benni Mack updated the commit message in patch set 5 11/18/21, 10:40

  7. core-ci voted on patch set 5 V +1 11/18/21, 11:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19453

  8. Benni Mack wrote 11/29/21, 10:19

    Change destination moved from master to main
  9. Nikita Hovratov updated the commit message in patch set 6 11/29/21, 11:45

  10. core-ci voted on patch set 6 V +1 11/29/21, 12:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19974

  11. Nikita Hovratov uploaded patch set 7 12/01/21, 20:35

  12. Nikita Hovratov commented on patch set 7 12/01/21, 20:42

    Reply

    I'm refering to this line: https://github.com/TYPO3/typo3/blob/bbb675a5f223bc0f57899240e13274ede12fcb89/typo3/sysext/core/Classes/DataHandling/DataHandler.php#L2949 It handles both cases, with and without TCEforms around a field definition. The mistake of the form extension is to add it to the "sections" part, too. Here: https://github.com/TYPO3/typo3/blob/bbb675a5f223bc0f57899240e13274ede12fcb89/typo3/sysext/core/Classes/DataHandling/DataHandler.php#L2917 it does not check for "TCEforms" and thus everything inside is not evaluated. IMO this patch resolves the correct usage. It does not intervene in flexform internals.
  13. core-ci voted on patch set 7 V +1 12/01/21, 20:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20364

  14. Nikita Hovratov uploaded patch set 8 12/01/21, 20:58

  15. core-ci voted on patch set 8 V +1 12/01/21, 21:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20368

  16. Nikita Hovratov uploaded patch set 9 12/16/21, 16:32

  17. Nikita Hovratov commented on patch set 9 12/16/21, 16:34

    Reply

    Done
  18. core-ci voted on patch set 9 V +1 12/16/21, 16:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21192

  19. Nikita Hovratov uploaded patch set 10 12/16/21, 18:26

  20. core-ci voted on patch set 10 V +1 12/16/21, 18:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21195

  21. Nikita Hovratov uploaded patch set 11 12/16/21, 19:25

  22. core-ci voted on patch set 11 V +1 12/16/21, 19:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21196

  23. Christian Kuhn voted on patch set 11 V +1 CR +1 12/16/21, 21:26

  24. Benni Mack voted on patch set 11 V +2 CR +2 12/16/21, 22:46

  25. Benni Mack merged patch set 12 12/16/21, 22:46