Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2013-04-02
Due date:
% Done:

0%

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

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

ImageTextContentObject.php (22.9 KB) ImageTextContentObject.php typo3/sysext/frontend/Classes/ContentObject/ Reindl Bernd, 2013-12-02 07:35

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #47004: CSS Styled Content | renderMethod = tableClosed2013-04-06

Actions
Actions #1

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)
Actions #2

Updated by Reindl Bernd over 11 years ago

Push.

Bug is still in 6.1.

Actions #3

Updated by Reindl Bernd about 11 years ago

Bug is still in 6.1.5

Actions #4

Updated by Stefan Galinski about 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).

Actions #5

Updated by Reindl Bernd about 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.

Actions #6

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

Actions #7

Updated by Torben Hansen about 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.

Actions #8

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

Actions #9

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

Actions #10

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

Actions #11

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

Actions #12

Updated by Wouter Wolters almost 10 years ago

  • Status changed from Under Review to Resolved
Actions #13

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF