[TYPO3] User Condition - Corresponding function executed twice ??

C.DeSousa papasosa at web.de
Tue Feb 13 12:02:30 CET 2007


Hi List,

  I'm developing an extension which contains a user condition in
ext_localconf.php. For testing purposes I write a log entry everytime
the corresponding function gets called.

What I found was that obviously the function gets called twice as I have
double entries in the log, although there's only one condition in the
Typoscript template.

Reproduction of the error :

*** TS Template : ***

...
config.no_cache = true

plugin.tx_test_error_pi1{
someVar = value
}

[userFunc = user_condition(param)]

myPage = PAGE
myPage.10 = TEXT
myPage.10.value = Hello World
[global]

*** EXT_LOCALCONF.PHP ***
...
$TYPO3_CONF_VARS['EXT']['extCache'] = 0;
...
function user_condition($param){
...
global $TSFE;
$TSFE->set_no_cache();
...
write2log("USER_CONDITION","user_condition executed with param $param!");
return true;
}

Result is two entries in the logfile, which is an undesired behavior
regarding the real extension-code. Logentries indicate that both times
the $param is passed also.

My guess is this maybe a caching issue, that's why I tried to turn
caching off in every place I could think of - but the function still
gets cached as I can see the function inside the
temp_cached...ext_localconf file.

I additionally set the checkbox "No Cache" in the pageheader, and the 
extension was created as USER_INT with the kickstarter.

So, my question is
a) why does the function get called twice ?
b) why does the chaching still happen ?

I'd appreciate any suggestions, thanks in advance,

  C. de Sousa


More information about the TYPO3-english mailing list