Project

General

Profile

Actions

Bug #91940

closed

Thumbnail not rendered if field is last in showitem

Added by Sebastian Fischer over 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2020-08-06
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

Description

If the image field is last in showitem and is not followed directly by the closing single tick the thumbnail does not get rendered

Not working

    'types' => [
        '0' => [
            'showitem' => '
                --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
                    --palette--;;information,
                    --palette--;;privacy,
                    image
            ',
        ],
    ],

Working

    'types' => [
        '0' => [
            'showitem' => '
                --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
                    --palette--;;information,
                    --palette--;;privacy,
                    image',
        ],
    ],

This is because of a preg_match in \TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList

'/(^|(.*(;|,)?))' . $thumbsCol . '(((;|,).*)|$)/'

which requires to have a comma and any character or the string end following the field name. Maybe we can change the pattern (;|,) to (;|,| ) to allow whitespaces aswell?


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #92118: Drop TCA [ctrl][thumbnails] and user uc[thumbnailsByDefault]Closed2020-08-27

Actions
Actions #1

Updated by Markus Klein over 3 years ago

  • Description updated (diff)
Actions #2

Updated by Markus Klein over 3 years ago

  • Status changed from New to Accepted

Can you try if this regex works for you?
/(?:^|(?:.*[,;]?))' . $thumbsCol . '(?:(?:[,;].*)|\s*$)/

Actions #3

Updated by Markus Klein over 3 years ago

  • Related to Task #92118: Drop TCA [ctrl][thumbnails] and user uc[thumbnailsByDefault] added
Actions #4

Updated by Markus Klein over 3 years ago

Sidenote: the regex has been removed in v11 with #92118

Actions #5

Updated by Susanne Moog over 1 year ago

  • Sprint Focus set to On Location Sprint

Check if issue still exists in current versions, if it does not, I would suggest closing this ticket.

Actions #6

Updated by Marcus Balasch over 1 year ago

I have not found the regular expression in sources of version 11.5.12 nor in 12.0 (main).

Actions #7

Updated by Markus Klein over 1 year ago

  • Status changed from Accepted to Closed
Actions

Also available in: Atom PDF