Issue Bug Closed

#67930Better error-message for error #1237823699 (Missing argument)

Hanspeter Lutz 07/06/15, 17:11 updated 10/02/18, 11:35

Description

During development I often get the error #1237823699 when forgetting to add a required argument in my templates. The error-message is not very helpful in finding the location of the problem. It says for example:

“#1237823699: Required argument “id” was not supplied”

It would be nice to have a hint where the problem occured like:

#1237823699: Required argument “id” was not supplied for “form.labelField.categoryTreeSelect” in template “Category/FormFields”

I implemented this in my version of TYPO3 by passing the $partialName from the class \TYPO3\CMS\Fluid\View\AbstractTemplateView to the method parse() of class \TYPO3\CMS\Fluid\Core\Parser\TemplateParser, and in storing the method local variable $matchedVariables as class-variable and accessing these two where the exception is thrown. I don’t know if this is the best solution, but it was the quickest on which gives me a great help in debugging my templates.

Reviews 1