[TYPO3-english] Strange behaviour with TYPO3 and XML

Jeppe Donslund jd at masters.dk
Tue Jun 1 08:57:58 CEST 2010


Den 01-06-2010 08:47, Bjoern Pedersen skrev:
> Am 01.06.2010 08:04, schrieb Jeppe Donslund:
>> Hi.
>>
>> I use this to generate XML from my TYPO3 output:
>>
>> xmloutput<
>> xmloutput= PAGE
>> xmloutput {
>>    typeNum=444
>>    config.disableAllHeaderCode = 1
>>    config.additionalHeaders = Content-type:text/xml
>>    includeLibs.mstxml = EXT:extkey/pi1/class.tx_mstxml_pi1.php
>>    10 = USER
>>    10 {
>>      userFunc = tx_mstxml_pi1->showXML
>>    }
>> }
>>
>> And this code makes my xml:
>>
>> $content = '<?xml version="1.0" encoding="UTF-8"?><markers>';
>> while ($sData = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($sRef)) {
>> $conf = array(
>>    // Link to current page
>>    'parameter' =>  $this->pi_getFFvalue($this->cObj->data['pi_flexform'],
>> "pages"),
>>    //'parameter' =>  22,
>>    // Set additional parameters
>>    'additionalParams' =>  '&tx_mstfiskeplads_pi1[spot]='.$sData["uid"],
>>    // We must add cHash because we use parameters
>>    'useCacheHash' =>  true,
>>    // We want link only
>>    'returnLast' =>  'url'
>> );
>
> Try debbuging the return from $this->pi_getFFvalue. My guess would be
> that it is a string or empty, not an int and that causes your problem.

But this is my output:

index.php?id=38
<marker name="Hansen" url="plads/hansen.html" address="" 
lng="10.545244216918945" lat="55.52782733064223" category="0" pladsnr="1"/>

index.php?id=38&type=444
<marker name="Hansen" url="" address="" lng="10.545244216918945" 
lat="55.52782733064223" category="0" pladsnr="1"/>

The only dofferent is that url is empty when I add &type=444.

So I guess that my url-generation is right.


More information about the TYPO3-english mailing list