Feature #4704

Improve parsing exception messages

Added by Bastian Waidelich over 10 years ago. Updated over 7 years ago.

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


Has patch:


Fluid Parsing Exceptions should contain the path and linenumber of the affected template for easier bug fixing.

4704_Improve_parsing_exception_messages.patch View (11.7 KB) Bastian Waidelich, 2009-09-20 16:47

Related issues

Related to TYPO3.Fluid - Feature #9211: Improve ViewHelper exception handling Rejected 2010-08-09
Related to TYPO3.Flow - Feature #37765: Display detailed informations within the "Could not resolve a route" exception why FLOW3 URI building has failed. Resolved 2012-06-05
Related to TYPO3.Fluid - Task #46091: Show source file name and position on exceptions during parsing Needs Feedback 2013-03-07
Related to TYPO3 Core - Bug #78002: Require cHash for cached plugin actions in Extbase Closed 2016-09-20


#1 Updated by Bastian Waidelich over 10 years ago

Attached is a very first version of a patch that includes template path, linenumber and current template extract to the exception messages of the template parser.
It still needs fine-tuning (e.g. the css styles should not be hardcoded in the error message of course), testing & probably better error handling.
Note: The "verbose" exception message is only active if \F3\Fluid\Fluid::$debugMode is TRUE
NoteĀ²: The patch has a sideeffect, it won't allow tags in view helper arguments. But I think, this should not be allowed anyways (and it makes Fluid slightly faster to skip those three regex lookups)

@anyone, please give feedback

#2 Updated by Bastian Waidelich over 9 years ago

  • Assignee deleted (Bastian Waidelich)

#3 Updated by Bastian Waidelich over 9 years ago

  • Status changed from Needs Feedback to Accepted

We decided, that we need to decouple this feature from the core.
We want to implement a hook mechanism that allows us to intercept the parsing process and count line numbers etc.
This hook will only be active in a special verbose mode. In FLOW3 this mode will be activated in Development Context by default. in v4 this could be enabled through the Extension Manager or through the devIPMask setting for example.
This won't use the TYPO3 hook implementation as the TemplateParser is not part of the public API (and because we don't want to have any $GLOBALS in Fluid). But it would be possible to attach your own hooks by writing your own TemplateView class.

#4 Updated by Sebastian Kurfuerst over 8 years ago

  • Tracker changed from Task to Story

#5 Updated by Sebastian Kurfuerst over 8 years ago

  • Status changed from Accepted to New

#6 Updated by Sebastian Kurfuerst over 8 years ago

  • Tracker changed from Story to Feature

Also available in: Atom PDF