[TYPO3-mvc] Cannot open backend module with trunk

Franz Koch typo3.RemoveForMessage at elements-net.de
Tue Nov 30 17:38:58 CET 2010


On 30.11.2010 17:34, Franz Koch wrote:
>>> And please note, that although your currently used static template might
>>> be configured correctly (you can test it by checking a extbase extension
>>> in FE), extbase is using the first template found, which might be some
>>> outdated TS template somewhere in your tree (like it was in my case).
>>
>> You mean the first in the hierarchy of pages? Thus in my case if I had a
>> dumb template on the CONFIG node with the Extbase TS (template which may
>> be "erased" a bit later), then it should work?
>
> No, the first valid in DB using default sorting options (uid) IIRC. And
> IIRC it's checking for root templates only, so some ext-template
> shouldn't care.

ok - I remembered slightly wrong, but the effect is the same:


protected function getCurrentPageId() {
	$pageId = (integer)t3lib_div::_GP('id');
	if ($pageId > 0) {
		return $pageId;
	}

		// 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 $rootTemplates[0]['pid'];
	}

		// get current site root
	$rootPages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'pages', 
'deleted=0 AND hidden=0 AND is_siteroot=1', '', '', '1');
	if (count($rootPages) > 0) {
		return $rootPages[0]['uid'];
	}

		// fallback
	return self::DEFAULT_BACKEND_STORAGE_PID;
}


If there is no id given in GET/POST it's searching for the first root 
template found and is using it's pid as default page, fetching the 
configuration for lateron.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list