[Typo3-dev] BUG: Conditions processed twice

Carlos Chiari (DE) ccho at dimension-e.net
Tue Dec 23 04:41:57 CET 2003


Hi Kasper:

Using an user_function which depends on $GLOBAL['obj']->variable being set
to decide if a condition matches or doesn't, as the "Screen Resolution
Detection" extension does, will be tricky, as this variable could change as
the function is run multiple times.

Anyway, knowing the source, I will dig into it to find out how it works and
maybe a workaround.

Thanks, and best regards,

Carlos



----- Original Message -----
From: "Kasper Skårhøj" <kasper at typo3.com>
To: "List for Core-/Extension development" <typo3-dev at lists.netfielders.de>
Sent: Monday, December 22, 2003 7:28 PM
Subject: Re: [Typo3-dev] BUG: Conditions processed twice


I checked it out. In class.t3lib_tstemplate matching of conditions are done
multiple times it seems. This is no bug but a quite normal and valid flow.
Of course you could argue that caching of the results could be used.
Anyways, this is not the case and it is not a bug since noone promised you
that a condition could not be evaluated twice in the same run.

Whether or not this behaviour can easily be changed is not clear to me.



God bless

- kasper

*********** REPLY SEPARATOR  ***********

On 22-12-2003 at 13:10 Carlos Chiari (DE) wrote:

>Hi List:
>
>I have found a bug (maybe there is a list somewhere for bugs... sorry):
>
>userFunc on CONDITIONS are being parsed twice , and thus the userFunc
>throws
>umpredictable results.
>
>example:
>------template ------
>[userFunc = tx_myfunction(1)]
> page.100 = TEXT
> page.100.data = register:counter
>[global]
>---------------------
>
>tx_myfunction($I) {
>$GLOBALS['TSFE']->register['counter'] ++;
>}
>
>page.100 shows that counter has been set to 2.
>
>I have even thought that maybe it is that CONDITIONS are procesed twice,
>userFunc or not, but as the content inside is fixed, ie: you can't set
>something like page.$counter = something, you can't tell that the content
>has been rendered twice.
>
>Anybody knows why this happens and how can be fixed?
>
>Best regards, and merry holidays to you all.
>
>Carlos
>
>
>
>_______________________________________________
>Typo3-dev mailing list
>Typo3-dev at lists.netfielders.de
>http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev



God bless

- kasper
- kasper

--------------------- o ---------------------
Mange kokke fordærver maden.




_______________________________________________
Typo3-dev mailing list
Typo3-dev at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev








More information about the TYPO3-dev mailing list