Feature #85484
openFeature-79409 renderAssetsForRequest doesn't honor {parsing off} processor
0%
Description
Fluid in TYPO3 has a feature to add assets to footer/header of the page when used inside a Controller.
https://docs.typo3.org/typo3cms/extensions/core/Changelog/8.6/Feature-79409-AutorenderAssetSectionsInFluidTemplateWithController.html
However when the fluid template has a processing instruction {parsing off} this will make the content of the template appear in header and footer section of the page, which is an unexpected behaviour for the developer.
As a workaround you can override function renderAssetsForRequest() in your controller.
See https://github.com/TYPO3/Fluid/issues/392 for the original bug-report and an example extension to demonstrate the problem.
Files
Updated by Mathias Brodala almost 6 years ago
- File fluid_parsing_off.zip fluid_parsing_off.zip added
Here's the test extension copied from Github.
Updated by Riccardo De Contardi over 4 years ago
Maybe I am totally wrong, but I wonder if this issue is valid: I report here the comment by Claus Due on https://github.com/TYPO3/Fluid/issues/392
Just a side note:
{parsing off}
used in a template is the same as doing$content = str_replace('{parsing off}', '', file_get_contents($myTemplateFile));
because no calls to f:render or designations of f:layout will be active. So it is definitely reserved for Partials or special cases where one might render a template with Fluid but sometimes feed it non-Fluid source.
But the conclusion is that using this modifier disables the parsing which means the template is no longer a Fluid template, technically. Which in turn means that implementations which require a Fluid template (such as the automatic rendering of header/footer asset sections) may not work if you intentionally disable Fluid.
Updated by Susanne Moog about 4 years ago
- Tracker changed from Bug to Feature
- Category changed from Extbase to Fluid
- Sprint Focus set to Needs Decision