[TYPO3] xajax and realurl

Rens Admiraal typo3 at ambitiondesign.nl
Tue May 8 21:41:59 CEST 2007


Hi all,

Sorry for posting again, but I've still 1 problem left while getting  
my extension compatible with real_url.
It seems that xajax doesn't work with real_url. When I do a xajax  
request I get the error 'there is whitespace in your response'

The exact same code works perfectly in a typo3 installation without  
real_url. Maybe I need to make some exteption in my localconf.php  
or .htaccess file, but I can't find any information on google...

Does anyone know if I have to make changes to my real_url, or  
something else, and what those changes are???

This is my code I use to make the xajax request:
$objResponse->addAssign('itemprijs[' . $uid . ']', 'innerHTML', $this- 
 >bedrag($productprijs));
$objResponse->addAssign('btwbedrag', 'innerHTML', $this->bedrag 
($btw));		
$objResponse->addAssign('totaalprijs', 'innerHTML', $this->bedrag 
($totaalprijs));		
$objResponse->addAssign("ajax_error", "innerHTML", "");
$objResponse->addAssign('aantal_producten', 'innerHTML', $this- 
 >countProductsInCart());
$objResponse->addAssign('item[' . $uid . ']', 'value', '' . $aantal);
$objResponse->addScript("checkMinimumPrice(" . $this- 
 >getMinimumOrderSize() . ")");
	//return the XML response
return $objResponse->getXML();

removing all the addAssign / addScript lines still gives the same  
error...

This is my localconf.php code for real_url:
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
	'www.kunstboekwinkel.nl' => array(
		'init' => array(
			'adminJumpToBackend' => 1,
			'enableCHashCache' => 1,
			'enableUrlDecodeCache' => 1,
             'enableUrlEncodeCache' => 1,
		),
         'redirects' => array(),		
         'preVars' => array(
    			array(
				'GETvar' => 'no_cache',
				'noMatch' => 'bypass',
			),
         ),
		'pagePath' => array(
			'type' => 'user',
			'userFunc' => 'EXT:realurl/ 
class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
			'spaceCharacter' => '-',
			'languageGetVar' => 'L',
			'expireDays' => 7,
			'rootpage_id' => 27,
			// 'encodeTitle_userProc'=>'EXT:realurl/ 
tx_realurl_encodeTitle_userProc.php:&user_encodeDates',
		),
		'postVarSets' => array(
			'_DEFAULT' => array(
				'catalogus' => array(
					array(
						'GETvar' => 'tx_AmbitionWebshopFE_pi1[pgroup]',
						'lookUpTable' => array(
							'table' => 'tx_AmbitionWebshopBE_groups',
							'id_field' => 'uid',
							'alias_field' => 'title',
							'spaceCharacter' => '-',
							'addWhereClause' => ' AND NOT deleted',
							'useUniqueCache' => 1,
							'useUniqueCache_conf' => array(
								'strtolower' => 1,
							),
						),
						'no_match' => 'bypass',
					),
					array (
						'GETvar' => 'tx_AmbitionWebshopFE_pi1[amb_product_id]',
						'lookUpTable' => array(
							'table' => 'tx_AmbitionWebshopBE_products',
							'id_field' => 'uid',
							'alias_field' => 'title',
							'spaceCharacter' => '-',
							'addWhereClause' => ' AND NOT deleted',
							'useUniqueCache' => 1,
							'useUniqueCache_conf' => array(
								'strtolower' => 1,
							)
						),
						'no_match' => 'bypass',
					),			
				),
			),
		),
		'fixedPostVars' => array(),
		'fileName' => array(
			'index' => array (
			),
			'defaultToHTMLsuffixOnPrev' => 1,
		),		
	),
);


More information about the TYPO3-english mailing list