Bug #48354
closed
wrong placement of image caption in text w/image
Added by Riccardo De Contardi over 11 years ago.
Updated about 6 years ago.
Description
Steps to reproduce in TYPO3 6.1.0:
1. create a CE text/w images and add 3 images
2. leave the caption of the 1st and 2nd image empty, add a caption to the 3rd image only
3. arrange them as you like (appereance tab > image alignment); Number of Columns: what you like.
4. the caption is placed after the 1st image
The same thing happens when you leave the 1st image without caption and put a caption on 2nd and 3rd.
Oddly, if you put a caption on 1st and 3rd image, they are placed correctly.
It seems that if you leave the 1st image without caption, all the others shifts (!)
- Status changed from New to Accepted
- Target version deleted (
6.1.1)
- TYPO3 Version changed from 6.1 to 6.0
OK, first part of the puzzle: The captions are passed as newline separated value inside the data:imagecaption = \nCaption Image 2\ncaption image 3
Thus the first caption is empty ... I guess later this empty value cause the other to shift ... I will now go in with debugging ;)
Ha ... and next comes a trim :D This removes the \n
at the beginning ... in PHP trim(content)
. This leaves us with Caption Image 2\ncaption image 3
, which means now caption 2 is shifted to caption 1 ;)
You can help yourself by removing the trim = 1
from stdWrap
.
tt_content.image.20.caption.1.1.trim >
That means also that you must not have any newlines in your caption.
- Status changed from Accepted to Under Review
I think this could be an heritage of version 4.7: if I remember, prior to FAL, the caption field was a single field against multiple images, and you had to separate the captions with a new line: a line for each caption ;)
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF