No subject


Sun May 19 00:00:10 CEST 2013


- it doesn't init the TSFE with enough information for link creation to
work.

If you search the archives for the mailing list you will see a lot of
emails about using TSFE in eID scripts. There are a few options: creating
the TSFE manually -
http://stackoverflow.com/questions/7835380/typo3-eid-how-to-access-config,
or just calling a typo3 page that has the plugin on it (either directly or
from your eID script) to avoid playing around with TSFE creation.

Richard

On 6 June 2013 10:33, Benoit Montereau <bmontereau at gmail.com> wrote:

> I'm runnign Typo3 4.7.4
>
> In order to execute ajax call through my Typo3 website, I just added my own
> "extension" as an "eID_include".
>
> Everything issetup and working fine (also databse connection & queries) as
> long as my extension is not trying to call Typo3 function.
>
> My extension should return a link definition as a string and I cannot get
> the getTypoLink_URL to work.
>
> As soon as I added in the init() function of my class the
>
> $TSFEObject = tslib_eidtools::getTSFE(); I get an error http 500
>
> Same error, occurs if this line is not present and I try to get the link
> definition using.
>
> So is it definitely not possible to call this function in my own eID
> extension or am I doing something wrong here?
>
> Thank you in advance for your help.
> Ben
>
>
>
> <?php
> if (!defined ('PATH_typo3conf')) die ('Could not access this script
> directly!');
>
> require_once(PATH_tslib. 'class.tslib_pibase.php');
> require_once(PATH_t3lib . 'class.t3lib_befunc.php');
> require_once(PATH_t3lib . 'stddb/tables.php');
> require_once(t3lib_extMgm::extPath('cms', 'ext_tables.php'));
>
> class tx_cascade_page_eid extends tslib_pibase {
> public function init() {
>  // initiate feobject
> $this->feUserObj = tslib_eidtools::initFeUser();
> //$TSFEObject = tslib_eidtools::getTSFE();
> // initiate database
> tslib_eidtools::connectDB();
> }
> public function main() {
> // get params for query
>  $param = t3lib_div::_GET();
> $st = $param['st'];
> if($st > 3){
> return;
> }
> $name = $param['name'];
>
> $pageid = 469;
> // $href = $GLOBALS['TSFE']->cObj->getTypoLink_URL($pageid);
> $href = $this->cObj->getTypoLink_URL($pageid);
> echo "hello world $name / $href";
>  }
> }
>
> if (defined('TYPO3_MODE') &&
>
> isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/cascade_page/class.tx_cascade_page_eid.php']))
> {
>
> include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/cascade_page/class.tx_cascade_page_eid.php']);
> }
>
> $module = t3lib_div::makeInstance('tx_cascade_page_eid');
> $module->init();
> $module->main();
> ?>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>


More information about the TYPO3-english mailing list