Review main Abandoned

85316[DOCS] Add note about f:form.* ViewHelper migration for StandaloneView

TYPO3com CR 0 V 0 Easy +37 −0 updated 03/17/25, 14:54

Commit message

References:
https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking
-98377-FluidStandaloneViewDoesNotCreateAnExtbaseRequestAnymore.html#avoidi
ng-html-f-form-in-non-extbase-context

Review

  • Code review CR 0
  • Verified V 0

Issues 2

Files 1

Review log 2432

Show 37 earlier messages
  1. TYPO3com uploaded patch set 1 07/21/24, 08:56

  2. core-ci voted on patch set 1 V -1 07/21/24, 09:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61884

  3. Lina Wolf commented on patch set 2 V -1 07/21/24, 12:34

    Published edit on patch set 1.
  4. core-ci voted on patch set 2 V -1 07/21/24, 12:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61890

  5. core-ci voted on patch set 2 V +1 07/21/24, 13:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61890

  6. Garvin Hicking commented on patch set 2 CR -1 07/21/24, 14:00

    Should we make this an include and put it into every f:form.* VH? (minor typos, can adress later)
  7. Lina Wolf commented on patch set 2 07/21/24, 14:05

    Reply

    If we make it a general include, we cannot give specific migration information. But yet we need that information for the other viewhelpers to. Also I don't think includes would be technically possible from a ViewHelpers doccomment.
  1. Simon Praetorius commented on patch set 2 07/21/24, 14:57

    I like the idea to provide specific migration examples for each ViewHelper, so an include doesn't really help here. However, I think that it makes sense to adjust the documentation of all ViewHelpers in one patch because they should be phrased similarly in my opinion.
  2. Lina Wolf commented on patch set 3 CR -1 V +1 07/21/24, 15:51

    Published edit on patch set 2.
  3. core-ci voted on patch set 3 V +1 07/21/24, 15:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61895

  4. Garvin Hicking uploaded patch set 4 V +1 07/22/24, 07:42

    Minor rephrasing
  5. Garvin Hicking commented on patch set 4 07/22/24, 07:43

    Reply

    True, I forgot that includes might not work here due to processing - did you check that by chance? We could still have the first block as an include, the migration of course would be specific. I changed the wording a bit, hope that's ok. I wonder - should we add a note that ALL <f:form...> elements need replacements? Or is it still okay to use `<f:form>` itself as a wrapper of the forms?
  6. core-ci voted on patch set 4 V -1 07/22/24, 07:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61922

  7. core-ci voted on patch set 4 V +1 07/22/24, 08:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61922

  8. Lina Wolf commented on patch set 4 07/22/24, 08:07

    Reply

    If you do the first block as an include you cannot link to the specific migration section. Also the information is then not there when the ViewHelper information is viewed in other contexts like the IDE. We do not use inlcudes here as all information should stay in the comment. We can of course mention it is all of them if you prefere. Please have a look at the Core CI.
  9. Garvin Hicking commented on patch set 4 07/22/24, 09:15

    Reply

    Core CI is currently in a sad state and reports errors when there are none. It's now green again (without any code changes) after I re-ran the CI. IMO we should patch all f:form ViewHelpers in one patch instead of one patch per VH? We can then use copy+paste for the adaption, I understand this better now.
  10. Lina Wolf commented on patch set 4 07/22/24, 09:18

    Reply

    I would like to have the Go! of the Fluid Maintainers before putting in the additional work of copy pasting this all over.
  11. Simon Praetorius commented on patch set 4 07/22/24, 11:35

    I would still prefer one patch for everything, but you have my GO for the change in this patch.
  12. Garvin Hicking commented on patch set 4 07/22/24, 11:44

    Reply

    We also need to mention that when migrating things like that, you need to take care about XSRF protection tokens plus making sure only trusted properties are handled on the receiving end. One may not just pass through options to the same endpoint like before, because it would be missing these hidden inputs elements otherwise. We'll need to phrase that in a short way; I could only provide the very long form of this 😄
  13. Garvin Hicking commented on patch set 4 07/22/24, 11:44

    Reply

    (plus: "Remember to replace all f:form.* viewhelpers as well as including the main <f:form> in non-Extbase context")
  14. Garvin Hicking commented on patch set 4 08/17/24, 08:56

    Before we finalize documenting this, this patch still needs verification for: * Can '<f:form>' still be used in non-extbase context * If yes, how to adjust trustedProperties, hmac/CSRF protection * If no, how to add trustedProperties, hmac/CSRF protection, and how to replace `<f:form>` with `<form>` (Action URI replacement etc.) The outcome of this should be added to the migration note.
  15. Christian Kuhn commented on patch set 4 08/17/24, 10:17

    note i'm working hard on deprecating StandaloneView in v13 ... maybe it's better to wait with this patch a bit to see if this materializes?
  16. Lina Wolf commented on patch set 4 08/17/24, 10:26

    Reply

    So. Fluid cannot be used in a non-Extbase context in v13 anymore then? And also this still needs to be documented for TYPO3 v12
  17. Lina Wolf commented on patch set 4 08/17/24, 10:29

    Reply

    In TYPO3 v11 it was very well possible to use f:form.checkbox outside of a f:form tag. So whoever has used a f:form viewhelper should then have a look in the f:form documentation. And the f:form documentation is the only one that worries about hmac/CSRF protection. A standalone checkbox will usually be intepreted by JavaScript or Css
  18. Lina Wolf commented on patch set 4 08/17/24, 10:30

    Reply

    I would like to have this one PR merged before I put in the work to document them all. There is forward and backward discussion here and I dont want to apply changes all over multiple locations.
  19. Garvin Hicking uploaded patch set 5 V +1 08/20/24, 11:30

    Rephrasing
  20. Garvin Hicking commented on patch set 5 CR +1 08/20/24, 11:35

    Reply

    Acknowledged

    Reply

    Acknowledged
    Resolving my comments. I would be okay with merging a note like this, and adapting the migration note for v13/main, when further deprecations come into play. I would like @lolli@schwarzbu.ch and/or @simon@praetorius.me to give final approval for this though, as I don't want to interfer with "proper migration path instructions" here.
  21. core-ci voted on patch set 5 V +1 08/20/24, 11:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63827

  22. Garvin Hicking commented on patch set 5 CR -1 08/26/24, 13:40

    see comment

    CheckboxViewHelper.php:97 Unresolved

    I've checked back with Simon and lolli and want to document what I did not properly understand before: If a form in non-Extbase context points to an extbase action (thus uses prefixes like myExtension[myModel][myCheckBox]), this will not work (due to hmac, security). In a case where this could be needed, there are possibilities (create lib.XXX in TS, create an extbase context, render that via cObj etc.), but this isn't fleshed out yet, and thus can't be documented well at this point. So, this current note is misleading/wrong (the rest of the patch is ok; and adding this note was my fault). I see three options to continue with this patch: A: Replace the note with something less misleading, i.e. "Note: Submitting a form from non-extbase context to an extbase-form target will not work out-of-the-box, and needs further handling through custom code.". Then apply this patch to every other similar f:form.* ViewHelper. Once we get a fully fleshed out documentation on what to do in a "non-extbase form submits to extbase form" case, all ViewHelpers docblocks need to be changed, again. B: Shorten this considerably. Only keep the first paragraph and let it point to a specific t3coreapi document, which we need to create. That coreapi document lists ALL of the migration for any f:form.* ViewHelper, and is version specific. This puts it into the docs scope. We can then later easily change the documentation when more solutions exist for migration. C: Wait until a fully-fleshed example exists, which will definitely be AFTER the 13.3 release, in the stabilization phase. Personally I would like to go with variant B, this also makes the ViewHelper docs lean, and not too bloated with migration notices, that would not apply for regular use of this ViewHelper. What do you think?
  23. Benni Mack updated the commit message in patch set 6 CR -1 V +1 10/18/24, 13:47

  24. Lina Wolf commented on patch set 6 CR -1 V -1 03/17/25, 14:54

    This change is not needed anymore as we can now edit the ViewHelper Reference right away. Please abandon
  25. Garvin Hicking abandoned the change 03/17/25, 14:54

    not needed anymore