Feature #51277

ViewHelper context should be aware of actual file occurrence

Added by Adrian Föder over 8 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
Has patch:


Especially when it comes to errors, or the need of determining a package, ViewHelpers need to know in what file they are noted.

Currently I know of the following cases:

  • Every kind of error like "argument foo needs to be supplied", or exceptions thrown in ViewHelpers
  • ViewHelpers that need to find out a package name, like f:translate and the .action VHs

The last case currently attempts to get this information (the current controller, hence package) from the Request, but there are cases where the Request is not available (starting with StandaloneView). So when using a ViewHelper and skipping any "package" argument, I as the integrator would expect the package where the current file resides as the default.

I don't know that much about the parsing internals, but I think it would get really tough since Fluid works on strings rather soon, right?
Maybe Layouts, Templates and Partials can be Objects with a "sourceFile", a "sourceCode" and a __toString method, and ViewHelpers have access to these objects... just an idea... No clue if that's possible in any way.

Related issues

Related to TYPO3.Fluid - Task #32035: Improve fluid error messagesNew2011-11-23

Related to TYPO3.Fluid - Task #34309: Unknown ViewHelpers cause exception - should be handled more gracefulNew2012-02-26


No data to display

Also available in: Atom PDF