Issue Bug Closed

#57125CLI/BE fetching TS should be deterministic to find "first" siteroot

Stefan Neufeind 03/20/14, 22:57 updated 10/02/18, 11:58

Description

Source says:
// get root template
$rootTemplates = $GLOBALS[‘TYPO3_DB’]->exec_SELECTgetRows(‘pid’, ‘sys_template’, ‘deleted=0 AND hidden=0 AND root=1’, ‘’, ‘’, ‘1’);
if (count($rootTemplates) > 0) {
return $rootTemplates0[‘pid’];
}

Siteroot is searched – but if there is more than one it’s not deterministic which will be the “first” one. Since we don’t have a “sorting” in sys_template, at least sort by crdate to use the first siteroot that was created.

Reviews 2