Issue Bug Closed

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

Dennis Metz 09/07/22, 09:58 updated 09/07/22, 10:43

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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Files 1

History 4

  1. Dennis Metz commented 09/07/22, 10:00

    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']
                ),
            ],
  2. Steffen Hastädt commented and changed attached Screen Shot 2022-09-07 at 11.54.09.png 09/07/22, 10:14

    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.

  3. Oliver Hader changed Duplicates #98233 09/07/22, 10:43

  4. Oliver Hader commented and changed status New Closed 09/07/22, 10:43

    → address in duplicate issue #98233