Bug #48354
closedwrong placement of image caption in text w/image
100%
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 (!)
Updated by Philipp Gampe over 11 years ago
- Status changed from New to Accepted
- Target version deleted (
6.1.1) - TYPO3 Version changed from 6.1 to 6.0
Updated by Philipp Gampe over 11 years ago
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 ;)
Updated by Philipp Gampe over 11 years ago
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 ;)
Updated by Philipp Gampe over 11 years ago
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.
Updated by Gerrit Code Review over 11 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20884
Updated by Riccardo De Contardi over 11 years ago
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 ;)
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20884
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/21726
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/21727
Updated by Philipp Gampe over 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c8f5403070a2a44a16c5a95536a7c1b5cd049bba.
Updated by Mathias Brodala over 10 years ago
Just for the record: this also affects TYPO3 CMS 4.7 and is a regression introduced with 57102904d645540a74d0519cfb8ebcc28fc20820