[TYPO3-core] RFC: #16594: Bug slide doesn't work without collect
JoH asenau
info at cybercraft.de
Wed Dec 1 16:06:54 CET 2010
Hi,
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
--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 16594.diff
Type: application/octet-stream
Size: 2249 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101201/85b29174/attachment.obj>
More information about the TYPO3-team-core
mailing list