Project

General

Profile

Actions

Feature #85484

open

Feature-79409 renderAssetsForRequest doesn't honor {parsing off} processor

Added by Peter Niederlag almost 6 years ago. Updated about 4 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2018-07-05
Due date:
% Done:

0%

Estimated time:
PHP Version:
7.1
Tags:
fluid parsing
Complexity:
Sprint Focus:
Needs Decision

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

fluid_parsing_off.zip (4.69 KB) fluid_parsing_off.zip Mathias Brodala, 2018-07-05 10:20
Actions #1

Updated by Mathias Brodala almost 6 years ago

Here's the test extension copied from Github.

Actions #2

Updated by Riccardo De Contardi about 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.

Actions #3

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
Actions

Also available in: Atom PDF