Project

General

Profile

Actions

Bug #56830

closed

Thumbnails in "List" module are not shown

Added by Andreas Kießling over 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2014-03-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

I don't know since when this feature is in the core, but is quite handy to have thumbnails of images in the list module.

But the implementation in DatabaseRecordList is buggy:

// Render thumbnails, if:
// - a thumbnail column exists
// - there is content in it
// - the thumbnail column is visible for the current type
$typeColumn = $GLOBALS['TCA'][$table]['ctrl']['type'];
$type = $row[$typeColumn];
$visibleColumns = $GLOBALS['TCA'][$table]['types'][$type]['showitem'];

This code fails for all tables that don't have a type column and will probably trigger some notices when it accesses $GLOBALS['TCA'][$table]['ctrl']['type']

How to test:
adding "'thumbnail' => 'images'," to the ctrl part of a table should get you a preview for the images column in the list module, if the field is shown for the current type.

If no type field is set at all, FormEngine checks for type 0 and 1 as a fallback, so this should be implemented in DatabaseRecordList as well:

// If current typeNum doesn't exist, set it to 0 (or to 1 for historical reasons, if 0 doesn't exist)
if (!$GLOBALS['TCA'][$table]['types'][$typeNum]) {
    $typeNum = $GLOBALS['TCA'][$table]['types']['0'] ? 0 : 1;
}

It is also documented in http://docs.typo3.org/typo3cms/TCAReference/Reference/Ctrl/Index.html , so fixing this is no new feature!

Actions #1

Updated by Frans Saris over 10 years ago

  • Status changed from New to Accepted

Could you push a patch to gerrit for this?

Actions #2

Updated by Gerrit Code Review over 10 years ago

  • Status changed from Accepted 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 https://review.typo3.org/28342

Actions #3

Updated by Gerrit Code Review over 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 https://review.typo3.org/28342

Actions #4

Updated by Gerrit Code Review over 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 https://review.typo3.org/28342

Actions #5

Updated by Alexander Opitz over 10 years ago

  • Is Regression changed from No to Yes
Actions #6

Updated by Gerrit Code Review over 10 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28342

Actions #7

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28350

Actions #8

Updated by Markus Klein over 10 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF