Project

General

Profile

Actions

Bug #98278

closed

One Image per Element / Upload buttons do not reappear after deletion

Added by Dennis Metz over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2022-09-07
Due date:
% Done:

0%

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

Description

With the latest update from 11.5.14 to 11.5.15, I noticed the following:

If I allow only 1 image in an element and save, the upload buttons disappear (so far good).
However, when I delete the image, the buttons do not reappear (this worked in 11.5.14).
I have to save here first and then the buttons show up again.

The problem leads to the behavior that elements which have an image as a mandatory field cannot be saved and the image cannot be replaced.


Files


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #98233: Regression: After deleting image in record "add" button is not displayed againClosed2022-08-31

Actions
Actions #1

Updated by Dennis Metz over 1 year ago

Code:

        'thumbnail' => [
            'exclude' => false,
            'label' => 'xxxxxxxxxxxxx',
            'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
                'thumbnail',
                [
                    'appearance' => [
                        'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
                    ],
                    'foreign_types' => [
                        '0' => [
                            'showitem' => '
                            --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
                            --palette--;;filePalette'
                        ],
                        //...more...
                    ],
                    'foreign_match_fields' => [
                        'fieldname' => 'thumbnail',
                        'tablenames' => 'tx_xxxxxxxxxxxxx',
                        'table_local' => 'sys_file',
                    ],
                    'maxitems' => 1
                ],
                $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
            ),
        ],
Actions #2

Updated by Steffen Hastädt over 1 year ago

We noticed the same issue.

The button does not disappear when the maximum amount of items is reached and causes a JavaScript error if you try to add more, and does not appear if you remove items and the amount of items is lower than the maximum amount of allowed items.

Actions #3

Updated by Oliver Hader over 1 year ago

  • Is duplicate of Bug #98233: Regression: After deleting image in record "add" button is not displayed again added
Actions #4

Updated by Oliver Hader over 1 year ago

  • Status changed from New to Closed

→ address in duplicate issue #98233

Actions

Also available in: Atom PDF