Bug #48354

wrong placement of image caption in text w/image

Added by Riccardo De Contardi about 8 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2013-05-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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 (!)


Related issues

Related to TYPO3 Core - Bug #57235: Image caption appears under wrong imageClosed2014-03-24

Actions
#1

Updated by Philipp Gampe about 8 years ago

  • Status changed from New to Accepted
  • Target version deleted (6.1.1)
  • TYPO3 Version changed from 6.1 to 6.0
#2

Updated by Philipp Gampe about 8 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 ;)

#3

Updated by Philipp Gampe about 8 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 ;)

#4

Updated by Philipp Gampe about 8 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.

#5

Updated by Gerrit Code Review about 8 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

#6

Updated by Riccardo De Contardi about 8 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 ;)

#7

Updated by Gerrit Code Review about 8 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20884

#8

Updated by Gerrit Code Review almost 8 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

#9

Updated by Gerrit Code Review almost 8 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

#10

Updated by Philipp Gampe almost 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#11

Updated by Mathias Brodala over 7 years ago

Just for the record: this also affects TYPO3 CMS 4.7 and is a regression introduced with 57102904d645540a74d0519cfb8ebcc28fc20820

#12

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF