[TYPO3] eID $TSFE error

Peter Klein peter at umloud.dk
Tue Oct 2 12:55:59 CEST 2007


Hi Sebastian.
You need to pass the Id of the calling page to your eID PHP file.
And since you got a "$page" var in this line:
$TSFE = new $temp_TSFEclassName($TYPO3_CONF_VARS, $page, 0, true);
I assume you allready has the page Id available. Then you can do something 
like this:

// Add rootLine array to TSFE, based on current page id.
// "$this->page" contains the ID of the calling/current page.
  $GLOBALS['TSFE']->rootLine = 
$GLOBALS['TSFE']->sys_page->getRootLine($this->page,'');

--
Peter Klein / Umloud Untd.

"Sebastian Böttger" <sebastian.boettger at gmail.com> wrote in message 
news:mailman.118.1191247359.20721.typo3-english at lists.netfielders.de...
> Hello,
>
> I want to use eID for receiving an AJAX answer and the want to use the 
> global $TSFE for it.
>
> The following I try for this:
>
> // ***********************************
> // Create $TSFE object (TSFE = TypoScript Front End)
> // Connecting to database
> // ***********************************
>
> // Initialize FE user object:
>  $feUserObj = tslib_eidtools::initFeUser();
>
>  $temp_TSFEclassName = t3lib_div::makeInstanceClassName('tslib_fe');
>  // create object instances:
>  $temp_TSFEclassName = t3lib_div::makeInstanceClassName('tslib_fe');
>  $TSFE = new $temp_TSFEclassName($TYPO3_CONF_VARS, $page, 0, true);
>    $TSFE->connectToDB();
>   $GLOBALS['TSFE'] = $TSFE;
>
>
> For filtering the database for the correct RootPIDs I use
>
> $storagePid = $GLOBALS['TSFE']->getStorageSiterootPids();
>
> to fetch the storagePIDs.
>
> This results in an
>
> *Fatal error: Passed variable is not an array or object in
> typo3_src-4.1.2/typo3/sysext/cms/tslib/class.tslib_fe.php* on line *3762*
> This is the following line in class.tslib_fe.php
>        reset($this->rootLine);
>
> Therefore $this->rootLine is not set.
>
> Anybody got an idea how to solve this problem?
>
> Best wishes
> Sebastian Böttger
>
>
> 




More information about the TYPO3-english mailing list