#97739Add syntax check when saving a modified typoscript template
Description
I was not aware (and think it is incredibly surprising) that there is no syntax check for typoscript code after modifying & saving it. Instead, the (broken) typoscript code will be saved and when it is executed, the parser will simply execute until it hits the point where the syntax error is located.
Neither an exception will be thrown nor some info/error will be written to the system protocol. Really?! (I hope that this behaviour is really a bug and unintended)
Is there any good reason for that behaviour? Do you intentionally want ppl to get mad about that (and spend hours finding bugs due to broken typoscript code?!)? see-no-evil-monkey
Suggestion:
Don’t accept broken typoscript code when editing templates in the backend.
Or at least: add some meaningful info to the system protocol that there’s a problem with your typoscript code and that it might (or rather will) cause severe/random errors/behaviour on your TYPO3 site(s).
I stumbled upon this behaviour while upgrading a site from TYPO3v9 to TYPO3v10 where quite a bit of typoscript code had to be modified; after the upgrade, some custom finisher that I wrote for the pretty cool form-framework/extension did not work anymore and it took me quite a while to figure that it was related to the broken typoscript setup (one code block was missing a closing curly bracket).
(see the following pull-request for more information -> https://github.com/TYPO3-Documentation/TYPO3CMS-Exceptions/pull/67 )
Thanks in advance for clarification :-)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 1
-
Georg Ringer commented and changed status
NewRejected <span data-processor="relativetime" data-value="2025-03-28T11:52:49+00:00" > 03/28/25, 11:52 </span>
thanks for creating the issue. since the rewrite of the TS parser there is a lot more feedback within the TS module but there won’t be a check before persisting.
this is neither easy nor will be done anytime soon – especially since TS gets less and less used and you should use a proper testing setup and using CI + CD.