[TYPO3-core] RFC: #16594: Bug slide doesn't work without collect

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Dec 1 17:54:02 CET 2010


Hi,

+1 by reading, understanding the weirdness and comparing with the logic
in previous versions.

+1 by testing.

Committed to trunk also fixing the CGL part (space after the "if" before
the parenthesis), rev. 9731.

Cheers,
Ernesto


JoH asenau schrieb am 01.12.2010 16:06:

> This is an SVN patch request.
> 
> Type: bug
> 
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=16594
> 
> Branches:
> Trunk
> 
> Problem:
> The following TS does nothing:
> styles.content.getRight.slide = -1
> page.10.marks.RIGHTCOL < styles.content.getRight
> 
> But the following works (middle line added):
> styles.content.getRight.slide = -1
> styles.content.getRight.slide.collect = -1
> page.10.marks.RIGHTCOL < styles.content.getRight
> 
> Unfortunately the "working" code drags in too much content (current page + parent pages), therefore it's not a real option.
> 
> Reason:
> There was a double ternary operator in the old version of the CONTENT element.
> $slideCollectFuzzy = $slideCollect?(intval($conf['slide.']['collectFuzzy'])?true:false):true;
> 
> This code returned TRUE for $slideCollectFuzzy even if there was no ['slide.']['collectFuzzy'] set at all, for each case having slideCollect not set as well. Sounds weird, is weird, but this was the former behaviour.
> 
> Because it is so weird, it has been "translated" into an if/else clause, which doesn't give the same results.
> 
> if(!$slideCollectFuzzy) {
>      $slideCollectFuzzy = FALSE;
> } else if ($slideCollect) {
>      $slideCollectFuzzy = TRUE;
> };
> 
> Additionally there was a surrounding if clause, that prevented the check, when there was no key "slide." available.
> 
> Solution:
> 
> Remove the surrounding if clause and change the "translation" to:
> 
>    if($slideCollectFuzzy) {
>     $slideCollectFuzzy = TRUE;
>    } else {
>     $slideCollectFuzzy = FALSE;
>    }
>    
>    if (!$slideCollect){
>     $slideCollectFuzzy = TRUE;
>    };
> 
> Attached Patch fixes the problem.
> 
> Cheers
> 
> Joey
> 



More information about the TYPO3-team-core mailing list