Bug #46864
closedrenderMethod=table (IMGTEXT rendering) not compatible with FAL yet
0%
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
Updated by Ernesto Baschny over 11 years ago
- Subject changed from renderMethod=table to renderMethod=table (IMGTEXT rendering) not compatible with FAL yet
- Category set to File Abstraction Layer (FAL)
Updated by Stefan Galinski almost 11 years ago
- Is Regression set to No
Hi Reindl,
Please create a patch and upload it to the review system. You can find detailed instructions in the TYPO3 wiki on the page http://wiki.typo3.org/Contribution_Walkthrough_(Git).
Updated by Reindl Bernd almost 11 years ago
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.
Updated by Reindl Bernd over 10 years ago
- 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
Updated by Torben Hansen almost 10 years ago
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.
Updated by Gerrit Code Review almost 10 years ago
- 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
Updated by Gerrit Code Review almost 10 years ago
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
Updated by Gerrit Code Review almost 10 years ago
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
Updated by Gerrit Code Review almost 10 years ago
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
Updated by Wouter Wolters almost 10 years ago
- Status changed from Under Review to Resolved