Bug #46864
closed
renderMethod=table (IMGTEXT rendering) not compatible with FAL yet
Added by Reindl Bernd over 11 years ago.
Updated about 6 years ago.
Category:
File Abstraction Layer (FAL)
Description
If i use renderMethod=table for images (newsletter needs rendering as a table) the images in TYPO3 6.0 wasn´t rendered, because "ImageTextContentObject" don´t check if imgList entry is integer.
So i modified the Code from Row 194+ like this:
for ($a = 0; $a < $imgCount; $a++) {
$imgKey = $a + $imgStart;
// if the image cannot be interpreted as integer (therefore filename and no FAL id), add the image path
if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($imgs[$imgKey])) {
$totalImagePath = intval($imgs[$imgKey]);
} else {
$totalImagePath = $imgPath . $imgs[$imgKey];
}
$GLOBALS['TSFE']->register['IMAGE_NUM'] = $a;
$GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] = $a;
$this->cObj->data[$this->cObj->currentValKey] = $totalImagePath;
$imgObjNum = intval($splitArr[$a]['imgObjNum']);
$imgConf = $conf[$imgObjNum . '.'];
This code ist the same, as it is in CssStyledContentController->render_textpic.
Additional i think, this had to be done at row 178 (ImageTextContentObject) and row 588 (CssStyledContentController).
Files
- Subject changed from renderMethod=table to renderMethod=table (IMGTEXT rendering) not compatible with FAL yet
- Category set to File Abstraction Layer (FAL)
Push.
Bug is still in 6.1.
I dont know how to create a Patch and cannot find this information in the given link. But i attached a file, where i have marked the modifications with //remove and //add comments. See code from line 194.
- Target version changed from 6.0.5 to next-patchlevel
In TYPO3 6.2 the renderMethode=table works.
But there is still a little bug.
In row 53 of ImageTextContentObject.php
$imgs = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $imgList);
should be
$imgs = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $imgList, TRUE);
because $imgList ist "ID,ID," and trimExplode returns 3 Elements if the third parameter is FALSE
Setting TRUE to trimExplode removes only empty values from the array which is good if you just have one image. As soon as you have multiple images in the content element, the last image is rendered multiple times.
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35407
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35407
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35407
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35704
- Status changed from Under Review to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF