[TYPO3-english] weird bug in realurl and fixedPostVars

Duch typo3 at ilomedia.net
Sun Nov 15 17:30:42 CET 2009


Hi all,

I had a working realurl configuration for tt_news which encoded URLs as follow : /detail/article/my-news.html

Since i wanted shorter URLs, i decided to use fixedPostVars, and that's where problems began...
Now i get tons of the following error each time a url gets encoded :  |Function/Class 't' was not prepended with 'user_'|.

A little search lead me to line 594 of the file class.tx_realurl.php in function encodeSpURL_setSequence.
At this line, there is a test on $setup['userFunc'] and funny enough, in my case, $setup is not an array but a string ("tx_ttnews[tt_news]") and for some unknown reasons it passes the test and tries to trigger the function called 't' (the first letter of tx_ttnews[tt_news])

Please note that i use tx_realurl_advanced.



My config :


Previously i had this in postVarSets : 

...
'article' => array(
	array(
		'GETvar' => 'tx_ttnews[tt_news]',
		'lookUpTable' => array(
			'table' => 'tt_news',
			'id_field' => 'uid',
			'alias_field' => 'title',
			'addWhereClause' => ' AND NOT deleted',
			'useUniqueCache' => 1,
			'useUniqueCache_conf' => array(
				'strtolower' => 1,
				'spaceCharacter' => '-',
			),
		),
	),
	array(
		'GETvar' => 'tx_ttnews[swords]',
	),
),
...


Which i moved to fixedPostVars like this

...
'fixedPostVars' => array(
	'23' => array( // 23 is the id of my detail page
		'GETvar' => 'tx_ttnews[tt_news]',
		'lookUpTable' => array(
			'table' => 'tt_news',
			'id_field' => 'uid',
			'alias_field' => 'title',
			'addWhereClause' => ' AND NOT deleted',
			'useUniqueCache' => 1,
			'useUniqueCache_conf' => array(
				'strtolower' => 1,
				'spaceCharacter' => '-',
			),
		),	
	)
),
...


Thanks for your help guys



More information about the TYPO3-english mailing list