[TYPO3-english] Rendering links with cObj->RECORDS inside eID script

Tobias Schmidt t.schmidt at minuskel.de
Fri Mar 1 16:06:55 CET 2013

Hi all,

I'm using an eID script to build some kind of xml feed. This feed is 
supposed to contain a rendered content element of type text. This works 
pretty well with the following code:

$conf = array(
   'tables' => 'tt_content',
   'source' => $uid,
   'dontCheckPid' => 1
$content = $this->cObj->RECORDS($conf);

It's only the links that don't get rendered as expected. In the database 
it says:

<link 1234 - internal-link "BlaBlaBla">Anchor Text</link>

The output of the RECORDS method is something like this:

Veggies sunt Arraybona vobis</a>

The opening a tag turns into the string "Array".

I guess it has to do with the initialization of TSFE etc. and the 
included libraries. This is what I have right now:

require_once(PATH_tslib . 'class.tslib_pagegen.php');
require_once(PATH_tslib . 'class.tslib_fe.php');
require_once(PATH_t3lib . 'class.t3lib_page.php');
require_once(PATH_tslib . 'class.tslib_content.php');
require_once(PATH_t3lib . 'class.t3lib_userauth.php');
require_once(PATH_tslib . 'class.tslib_feuserauth.php');

if (version_compare(TYPO3_version, '4.3.0', '<')) {
   $tsfeClassName = t3lib_div::makeInstanceClassName('tslib_fe');
   $GLOBALS['TSFE'] = new $tsfeClassName($GLOBALS['TYPO3_CONF_VARS'], 
t3lib_div::_GP('id'), '');
} else {
   $GLOBALS['TSFE'] = t3lib_div::makeInstance('tslib_fe', 
$GLOBALS['TYPO3_CONF_VARS'], t3lib_div::_GP('id'), '');



I also tried to extend pibase but it didn't help.

The website uses TYPO3 4.2 (shame but update is not an option right now)

Does anybody know which libraries to include or what kind of 
initilization has to be done to get links working?

best regards

More information about the TYPO3-english mailing list