Project

General

Profile

Actions

Bug #84885

closed

Images in backend list module aren't shown, if they in a palette

Added by David Gurk over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-04-27
Due date:
% Done:

100%

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

Description

It might be a regression introduced with #26753.

I have a custom table with multiple images as FAL records. I use 'ctrl' => 'thumbnail' (https://docs.typo3.org/typo3cms/TCAReference/Ctrl/Index.html#thumbnail) to define a single as thumbnail.

This looks like:

<?php

return [
    'ctrl' => [
        // [...]
        'thumbnail' => 'image_portrait',
        // [...]
    ],
    'interface' => [
        // [...]
    ],
    'types' => [
        '1' => [
            'showitem' => '
            // [...]
            --palette--;LLL:EXT:project/Resources/Private/Language/locallang_db.xlf:tx_project_domain_model_contestapplicationformdata.palette.images;images,
            // [...]',
        ],
    ],
    'palettes' => [
        // [...]
        'images' => ['showitem' => 'image_portrait, image_fashion'],
        // [...]
    ],
    'columns' => [
        // [...]
        'image_portrait' => [
            'exclude' => 0,
            'label' => 'LLL:EXT:project/Resources/Private/Language/locallang_db.xml:tx_project_domain_model_contestapplicationformdata.image_portrait',
            'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('image_portrait', [
                // [...]
            ], 'jpg,jpeg,png,pdf'),
        ],
        'image_fashion' => [
            'exclude' => 0,
            'label' => 'LLL:EXT:project/Resources/Private/Language/locallang_db.xml:tx_project_domain_model_contestapplicationformdata.image_fashion',
            'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('image_fashion', [
                // [...]
            ], 'jpg,jpeg,png,pdf'),
        ],
        // [...]
    ],
];

But this doesn't work, since DatabaseRecordList checks for the thumbnail column name in $GLOBALS['TCA'][$table]['types'][$type]['showitem']. But I wrapped my image column in a palette.

https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php#L1460

It would be necessary to determine the visibility state of the image on another way.

Something like looking through all palettes sound wrong to me.

My current workaround is, to move the wanted image outside the palette to showitems.

Any ideas from someone?

Best regards


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #26753: Picture in backend list module will be displayed after change element type from picture to textClosed2011-05-11

Actions
Actions

Also available in: Atom PDF