Review main Merged

85336[BUGFIX] Free ext:form ConfirmationFinisher COR calls from extbase

Markus Klein CR +2 V +2 Easy +1 −1 updated 07/25/24, 11:10

Commit message

* ext:form is FE an extbase plugin and operates with an
  extbase request created by extbase bootstrap (or by
  FluidTemplateContentObject, but that's a different story).
* ConfirmationFinisher has option 'contentElementUid', which
  - when set - creates a ContentObjectRenderer to render
  specific content elements.
* ContentObjectRenderer then often renders this content
  element using FluidTemplateContentObject. Various code
  within Fluid rendering then applies magic to create new
  requests, *if* an extbase request is given. This can lead
  to broken template resolving when rendering in
  FluidTemplateContentObject.

This entire thing is quite messy. We're taking measures to
resolve the underlying flaws in v13. To fix the situation
in v12, the idea is like that: When ConfirmationFinisher
calls ContentObjectRenderer and hands over its request, it
should "free" that request from its own extbase context
to not trigger pollution by code that does things if an
extbase request is given.

Note this was not an issue in v11 since only v12 started
handing over the extbase request to ContentObjectRenderer,
in v11 it was indirectly pulled from $GLOBALS['TYPO3_REQUEST']
within ContentObjectRenderer, which is the "original" request
before it is turned into an extbase request by extbase
plugin bootstrap.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Markus Klein +1
    • Simon Praetorius +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Markus Klein +1
    • Simon Praetorius +1
    • core-ci +1 CI

Issues 5

Files 1

Review log 1822

  1. Markus Klein uploaded patch set 1 07/23/24, 13:59

  2. core-ci voted on patch set 1 V +1 07/23/24, 14:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62013

  3. Georg Ringer commented on patch set 1 07/23/24, 14:23

    question is why you are affected but nobody else? pretty sure people are using this finisher quite a lot
  4. Markus Klein commented on patch set 1 07/23/24, 23:43

    Reply

    My only guess: Most people are using only the message option and not the contentElementUid option.
  5. Christian Kuhn commented on patch set 1 CR -1 07/24/24, 10:16

    ConfirmationFinisher.php:103

    COR pulls request from globals if not given (but needed), and this should be avoided. i think we should understand *why* this fixes the issue, to see if this is actually a good solution. i'll -1 for now.
  6. Christian Kuhn commented on patch set 1 07/24/24, 21:23

    ConfirmationFinisher.php:103 Reply

    $this->contentObjectRenderer->setRequest($this->finisherContext->getRequest()->withoutAttribute('extbase')); Cloud you please test this? I'm quite confident this will solve the issue and is the better solution. I can explain details if you give it a go. Related (but v13 only): https://review.typo3.org/c/Packages/TYPO3.CMS/+/85346 - plus a couple of further patches we started to prepare to reduce the mess in this area ...
  7. Markus Klein commented on patch set 1 07/25/24, 07:06

    We found out that the CE needs to reside on a sysfolder in order to trigger this issue. (We did look into it, why this matters, yet)

    ConfirmationFinisher.php:103 Reply

    Confirmed, this solves the issue too.
  8. Christian Kuhn uploaded patch set 2 CR -1 V +1 07/25/24, 10:23

  9. Christian Kuhn commented on patch set 2 CR +1 V +1 07/25/24, 10:26

    ConfirmationFinisher.php:103 Reply

    Done
  10. Christian Kuhn commented on patch set 2 07/25/24, 10:30

    Reply

    it needs some further setup details to actually trigger a problem, probably involving calls to ConfigurationManager within the COR sub request.
  11. core-ci voted on patch set 2 V +1 07/25/24, 10:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62167

  12. Simon Praetorius voted on patch set 2 CR +1 V +1 07/25/24, 10:38

  13. Christian Kuhn uploaded patch set 3 CR +1 V +1 07/25/24, 10:47

  14. Christian Kuhn voted on patch set 3 CR +1 V +1 07/25/24, 10:48

  15. Markus Klein updated the commit message in patch set 4 CR +1 V +1 07/25/24, 10:48

  16. Markus Klein voted on patch set 4 CR +1 V +1 07/25/24, 10:49

  17. Simon Praetorius voted on patch set 4 CR +1 V +1 07/25/24, 10:49

  18. Christian Kuhn voted on patch set 4 CR +1 V +1 07/25/24, 10:49

  19. core-ci voted on patch set 4 V +1 07/25/24, 11:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62176

  20. core-ci voted on patch set 3 V -1 07/25/24, 11:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62175

  21. Christian Kuhn voted on patch set 4 CR +2 V +2 07/25/24, 11:10

  22. Christian Kuhn merged patch set 5 07/25/24, 11:10