Finding TypoScript errors.
Posted: February 16th, 2012 | Author: tolleiv | Tags: debug, typo3 | 10 Comments »When you work on TypoScript templates in TYPO3, errors might show up in the TypoScript Object Browser. Within the error messages you’ll see a more or less detailed error description with the related line number. Within most setups these line numbers won’t relate to any of your sys_template records or TypoScript files directly. But they still provide value if you know how they help to find the right spot. As it’s not too obvious how to find the right spot I’ve created a little screenshot series to guide you to the broken spots in your templates.
So that’s what you might see in your TypoScript Object Browser:
Switching from there to the Template Analyzer:
At the bottom of the Template Analyzer, you’ll find a “Complete TS” section and a link ~which looks like normal text.
Clicking on that link will give you the entire concatenated TypoScript and here you’ll also find that the line numbers finally match to the error message.
A well hidden gem which works most likely in all TYPO3 4.x versions
Edit: In the meantime, Ingo’s patch made it through the review process. So users of TYPO3 4.7 and above will find a nice and handy “Show details” link next to the error message. Makes it much much faster to find the broken spot. Thanks Ingo





Thank you for writing this all down in one spot. I knew this stuff, but when trying to teach young bucks about it, I’d get tongue twisted.
Now I guess we don’t have an excuse to keep these errors around any longer.
Ciao!
So wouldn’t it make sense to link from the error message to that view and the correct line number?
Would make total sense, of course. Feature or Bug
A typical hidden gem. I discovered it by chance a while ago. I think it was introduced in 4.2 ou 4.3, so it’s definitely available on all supported version.
[...] einem Blog Beitrag erklärt Tolleiv Nietsch, wie man Fehler in der TypoScript Syntax finden kann, auch wenn das TypoScript auf mehrere Seiten, [...]
@François It was available since 3.x, but there was no link printed for versions below 4.2.
So you can use this feature in *all* TYPO3 versions.
And it’s available TYPO3 versions before that don’t have that link “show all” yet. I learned that from Steffen Ritter at T3DD10: Click on just one of the offered Typoscript parts offered in the tree at the top of the template analyzer and open it IN A NEW window. Then change the end of the url to “…&template=all” and reload. Damn cool. If I only had known that years before …
A well hidden gem which works most likely in all TYPO3 4.x versions
I think the Feature “view the complete” exist in all versions higher then 4.3
http://review.typo3.org/9112
[...] Hallo, naja, Fehler in deinem TS kann TYPO3 auch von Haus aus erkennen
Finding TypoScript errors. | the fancy part of the web – tolleiv.de [...]