Review main Merged

75288[BUGFIX] Respect non standard prototype names

waldhacker CR +2 V +2 Normal +235 −7 updated 08/08/22, 12:45

Commit message

The patchset https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460/
has moved the business logic from the RenderViewHelper to the
FormRequestHandler.
Thereby the process for detecting the prototype name was changed by
mistake.
The result is that custom prototype names are no longer applied.
This patchset restores the correct behavior.

Review

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

Issues 1

Files 2

Review log 2835

Show 810 earlier messages
  1. waldhacker uploaded patch set 1 07/26/22, 10:39

  2. core-ci voted on patch set 1 V +1 07/26/22, 10:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29541

  3. Oliver Hader commented on patch set 1 07/26/22, 14:31

    FormRequestHandler.php:209

    Wouldn't it be simpler the other way round? ``` if (!empty($prototypeNameOverride)) { $rawFormDefinition['prototypeName'] = $prototypeNameOverride; } elseif (empty($rawFormDefinition['prototypeName'])) { $rawFormDefinition['prototypeName'] = 'standard'; } ```
  4. waldhacker voted on patch set 1 CR +1 07/26/22, 14:50

  5. waldhacker voted on patch set 1 CR 0 07/26/22, 14:50

  6. waldhacker commented on patch set 1 07/26/22, 14:51

    FormRequestHandler.php:209 Reply

    Ack
  7. waldhacker commented on patch set 2 07/26/22, 14:52

    Published edit on patch set 1.
  8. waldhacker commented on patch set 2 07/26/22, 14:54

    FormRequestHandler.php:209 Reply

    Done
  9. core-ci voted on patch set 2 V +1 07/26/22, 15:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29548

  10. Oliver Hader voted on patch set 2 CR +1 07/27/22, 08:23

  1. Andreas Steiger commented on patch set 2 V +1 CR +1 07/29/22, 11:50

    nice! Thanks.
  2. Helmut Hummel commented on patch set 2 07/29/22, 14:07

    FormRequestHandler.php:211

    The elseif is obsolete here and creates an extra layer of unnecessary code complexity. My suggestion is to simply go for this instead: if (!empty($prototypeNameOverride)) { $rawFormDefinition['prototypeName'] = $prototypeNameOverride; } if (empty($rawFormDefinition['prototypeName'])) { $rawFormDefinition['prototypeName'] = 'standard'; }
  3. waldhacker commented on patch set 3 07/29/22, 14:10

    Published edit on patch set 2.
  4. waldhacker commented on patch set 4 07/29/22, 14:11

    Published edit on patch set 3.
  5. waldhacker commented on patch set 4 07/29/22, 14:12

    FormRequestHandler.php:211 Reply

    Done
  6. core-ci voted on patch set 3 V -1 07/29/22, 14:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29698

  7. Helmut Hummel commented on patch set 4 CR -1 07/29/22, 14:19

    FormRequestHandler.php:212

    What is the the reasoning behind implementing the fallback to "standard" here in addition to the implementation already done in the factory? Additionally, this also now bypasses the interface API of the factory, where the override prototype is passed in as argument, which basically changes the API behaviour for custom factories
  8. Helmut Hummel commented on patch set 4 07/29/22, 14:20

    FormRequestHandler.php:211 Reply

    Thanks!
  9. Helmut Hummel commented on patch set 4 07/29/22, 14:24

    The more I think about it, the more I'd rather go with what I suggested here: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75332
  10. core-ci voted on patch set 4 V +1 07/29/22, 14:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29701

  11. waldhacker commented on patch set 5 07/29/22, 14:34

    Published edit on patch set 4.
  12. waldhacker commented on patch set 6 07/29/22, 14:34

    Published edit on patch set 5.
  13. core-ci voted on patch set 5 V +1 07/29/22, 14:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29703

  14. waldhacker commented on patch set 6 07/29/22, 14:45

    FormRequestHandler.php:212 Reply

  15. core-ci voted on patch set 6 V +1 07/29/22, 14:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29704

  16. Helmut Hummel commented on patch set 6 V +1 CR +1 07/29/22, 15:35

    FormRequestHandler.php:212 Reply

    Hm, okay right. Out of scope of this bugfix, I'm still wondering why this fallback had been implemented there (and now here again) in addition to the fallback logic in the ArrayFactory? Is there a plan to change the factory interface to always require a prototype name? Now (and before as well) the build method is never called with a null value.
  17. Stefan Bürk commented on patch set 6 07/29/22, 21:53

    Not tested it, if I got this right this fixes a regression or at least a bug. I think we should cover this with at least one test - or not ?
  18. waldhacker uploaded patch set 7 07/30/22, 12:43

  19. waldhacker commented on patch set 7 07/30/22, 12:45

    Reply

    Done
  20. core-ci voted on patch set 7 V +1 07/30/22, 12:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29714

  21. Daniel Gohlke voted on patch set 7 CR +1 08/08/22, 11:34

  22. Daniel Gohlke voted on patch set 7 V +1 08/08/22, 11:47

  23. Björn Jacob voted on patch set 7 V +1 CR +1 08/08/22, 12:28

  24. waldhacker commented on patch set 7 V +2 CR +2 08/08/22, 12:42

    FormRequestHandler.php:212 Reply

    There are no plans yet, but we'll look at that in the next sprint.
  25. waldhacker merged patch set 8 08/08/22, 12:45