86687[BUGFIX] Respect `templateName` for fluid template assets rendering
Commit message
Review
-
Code review CR +2 Done
- Oli Bartsch +2
- Benni Mack +1
-
Verified V +2 Done
- Oli Bartsch +2
- Benni Mack +1
- core-ci +1 CI
Issues 1
Files 3
- typo3/sysext/frontend/Classes/ContentObject/FluidTemplateContentObject.php10+3 −1
- typo3/sysext/frontend/Tests/Functional/Fixtures/Extensions/test_fluid_template/Configuration/TypoScript/assets.typoscript+4 −2
- typo3/sysext/frontend/Tests/Functional/Fixtures/Extensions/test_fluid_template/Resources/Private/Templates/AssetsSections.htmlnew+1 −0
Review log 2227
Show 12 earlier messages
-
Stefan Rumzucker uploaded patch set 1 10/22/24, 11:26
-
core-ci voted on patch set 1 V +1 10/22/24, 11:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68363
-
Simon Praetorius commented on patch set 1 10/22/24, 14:05
Could you add a short explanation about the issue to your commit message? It would also be great if we could cover this with a new test case. Let me know (e. g. via Slack) if you need any help with that. -
Oli Bartsch commented on patch set 1 10/22/24, 15:42
FluidTemplateContentObject.php:138Just from reading, I wonder if instead of moving the time of rendering we should just set the controller action here? `$view->getRenderingContext()->setControllerAction($templateFilename);` -
Christian Kuhn commented on patch set 1 10/22/24, 15:51
FluidTemplateContentObject.php:138Replyno. please don't add this extbase specific thing back at this point. -
Oli Bartsch commented on patch set 1 10/22/24, 18:24
FluidTemplateContentObject.php:138ReplyAck. However, we have to ensure that the move of the rendering does not have any side effects. -
Stefan Rumzucker uploaded patch set 2
V +110/22/24, 18:55 -
core-ci voted on patch set 2 V +1 10/22/24, 19:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68396
-
Stefan Rumzucker commented on patch set 2 10/22/24, 21:01
FluidTemplateContentObject.php:138ReplyRight, this would change the order of the collected header respectively footer data. We could provide the template name in `FluidViewAdapter::renderSection` where `setControllerAction` could be called accordingly. What's the actual reason to deprecate `FluidViewAdapter::setTemplate`. Wouldn't it be a straight forward way to define it like this? ``` $view->setTemplate($templateFilename); $this->renderFluidTemplateAssetsIntoPageRenderer($view, $variables); $content = $view->render(); ``` As `$view->render($templateFilename)` would also change the state of the rendering context in terms of the controller action, why don't do it explicitly with `$view->setTemplate($templateFilename)` up front? -
Simon Praetorius commented on patch set 2 10/23/24, 08:57
FluidTemplateContentObject.php:138ReplyI would propose the following: * add a third argument `$templateFilename` to `renderFluidTemplateAssetsIntoPageRenderer()` and set the controllerAction there (like oli suggested) to make it clear that this is necessary because of the `renderSection()` calls * Keep using `$view->render($templateFilename)` at the original position after the page renderer stuff It's unfortunate that `renderSection()` depends on state that is not provided to the function, but we can't resolve this at the moment. -
Stefan Rumzucker uploaded patch set 3
V +110/23/24, 13:51 -
Oli Bartsch commented on patch set 3 10/23/24, 13:54
FluidTemplateContentObject.php:138ReplyQuite unsure whether we should call `setControllerAction` after Christian’s comment. -
core-ci voted on patch set 3 V +1 10/23/24, 13:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68459
-
Stefan Rumzucker commented on patch set 3 10/23/24, 14:00
FluidTemplateContentObject.php:138ReplyWell, then I'm out of options ^^. We could move this to the `FluidViewAdapter` which is basically what `FluidViewAdapter::setTemplate` already does. But it's deprecated and suggests to use `setControllerAction`. -
Christian Kuhn commented on patch set 3 10/23/24, 17:38
i'll have another detail look soon, as well. -
Oli Bartsch commented on patch set 3 10/23/24, 17:39
FluidTemplateContentObject.php:138ReplyWe might just stick with the first version and move the render() call. Let's wait for @lolli@schwarzbu.ch . -
Stefan Rumzucker commented on patch set 3 11/05/24, 12:51
FluidTemplateContentObject.php:138ReplyAny update on this one? Would be great if we could make that work in the upcoming release. -
Oli Bartsch uploaded patch set 4
V +111/06/24, 07:58 -
Oli Bartsch commented on patch set 4 11/06/24, 07:58
FluidTemplateContentObject.php:138ReplyTalked to lolli a couple of days ago and I still think, we should just stick with your first version, moving the render call. I updated the patch accordingly. -
Oli Bartsch voted on patch set 4 CR +1 V +1 11/06/24, 07:58
-
core-ci voted on patch set 4 V +1 11/06/24, 08:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69135
-
Oli Bartsch updated the commit message in patch set 5
CR +1V +111/06/24, 08:07 -
Oli Bartsch voted on patch set 5 CR +1 V +1 11/06/24, 08:07
-
core-ci voted on patch set 5 V +1 11/06/24, 08:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69136
-
Benni Mack voted on patch set 5 CR +1 V +1 11/06/24, 08:35
-
Oli Bartsch voted on patch set 5 CR +2 V +2 11/06/24, 09:29
-
Oli Bartsch merged patch set 6 11/07/24, 08:49