[TYPO3-core] RFC: fix bug: 6561 imgMax and imgStart (IMGTEXT) not working properly

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Sat Oct 20 18:37:24 CEST 2007


Helmut Hummel schrieb:
> This is a SVN patch request.
> 
> Type: bugfix
> 
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=6561
> 
> Branches:
> 4_1, Trunk
> 
> Problem:
> If you set tt_content.images.20.imgStart = 1
> in order not to show the first image in the list, the capiton of the
> first image is nevertheless shown, but the last image is not.
> This happens, because the wrong index key for the created image array is
> used.
> 
> Additionally the stdWrap for imgMax is not applied.
> 
> You can easily test this with an image content element with several
> images and one (or three) lines of TS-Code in the setup:
> 
> tt_content.images.20.imgStart = 1
> tt_content.images.20.imgMax = 1
> tt_content.images.20.imgMax.wrap = |0
> 
> 
> Solution:
> Use the right index key for the generated image array and use the
> stdWrapped imgMax value to calculate the maximum count of images.

The imgMax fix is certainly correct, but I wonder about the main part of 
your patch. In line 996 $index is set to $imgStart. So the loop that 
renders the images calculates in line 1066 the array index with the 
start image number. But you're patch forces index 0 for that case.

Masi


More information about the TYPO3-team-core mailing list