Zum Inhalt springen

user_function bewirkt fehlermeldung im Backend

Erstellt am 14. Oktober 2005 · 1 Antwort · letzte Antwort am 17. Oktober 2005

Tags: Frage

bvoit ·

Ich habe folgende user_function in die localconf.php geschrieben:

function user_more_than_1_subpage()	{
	$recs = $GLOBALS['TSFE']->sys_page->getMenu($GLOBALS['TSFE']->page['uid'],'uid,pid,doktype,mount_pid,mount_pid_ol');
	if(count($recs) == 1){
		return false;
	} else {
		return true;
	}
}

Im TS-Setup wird sie wie folgt aufgerufen:

[userFunc = user_more_than_1_subpage()]
   temp.mainTemplate.subparts.NAV3.1 < temp.TITLE
   temp.mainTemplate.subparts.NAV3.2 < temp.NAV3

[else]
   temp.mainTemplate.subparts.NAV3.1 < temp.BANNERTITLE
   temp.mainTemplate.subparts.NAV3.2 < temp.BANNER
[end]

Dieser Aufruf funktioniert auch so wie er sollte.

Doch jetzt kommt das unerklärbare:

Im Backend kommt beim Versucht den Seitentitel einer Seite anzuzeigen, folgende Meldung:


Fatal error: Call to a member function on a non-object in /www/guenther.cyberhouse.at/web/typo3conf/localconf.php on line 38

Und in dieser Zeile steht folgendes:

$recs = $GLOBALS['TSFE']->sys_page->getMenu($GLOBALS['TSFE']->page['uid'],'uid,pid,doktype,mount_pid,mount_pid_ol');

Wieso will das Backend beim Aufruf des Seitentitels darauf zugreifen? Was kann ich dagegen machen? Hat jemand eine Idee?

Danke im vorraus.
Bernhard