#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.
Reviews 3
Files 1
History 47
-
Garvin Hicking changed category 01/31/25, 13:58
-
Christian Kuhn commented 01/31/25, 14:02
-
Gerrit Code Review pushed patch set 1 for main to change 87964 status
NewUnder Review 01/31/25, 14:11 -
Gerrit Code Review pushed patch set 1 for 13.4 to change 87965 01/31/25, 14:52
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 87966 01/31/25, 14:53
-
Christian Kuhn commented and changed status
Under ReviewResolved done0 %100 % 01/31/25, 15:10Applied in changeset commit:89111c84357e57556f0211cc3cc47747f9470a4f.
-
Benni Mack changed status
ResolvedClosed 12/02/25, 14:26
confirmed. sys_template records shouldn’t be on pid 0. but still, we should sanitize this. will fix.