#106042Exception in TypoScript module with pid = 0
Description
An exception is thrown in the ‘TypoScript’ backend module if there is a sys_template entry with pid = 0.
While this error is only displayed on the corresponding page in the page tree in v11, the module is unusable in v12.
This is due to a line that fetches the current element of an array and then checks it without checking whether there is an element at all: https://github.com/TYPO3/typo3/blob/5dc6d2180eb2d3a90469d50c4baa9aa6760904c5/typo3/sysext/tstemplate/Classes/Controller/TemplateRecordsOverviewController.php#L127
Outside of this function, nothing is called if the root line is empty. Here, however, it is only made empty in the statement above it, which means that the condition does not apply.
Even if there should be no sys_templates on pid 0, in the current case this is probably due to an outdated data status and should not make the backend module unusable.
clipboard-202501311450-9m5cb.png