Project

General

Profile

Actions

Bug #103663

open

Broken icons in Content Element wizard with auto registration

Added by Georg Ringer 13 days ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2024-04-18
Due date:
% Done:

0%

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

Description

Since #102834 content elements are registered automatically for the content element wizard (which is a great thing!!).

However if no icon is provided during ExtensionUtility::registerPlugin a broken icon is rendered. IMO no icon or a default icon should be rendered then.

I tracked it down that in NewContentElementController the wizard is populated with

$wizardEntry = [
                'iconIdentifier' => $selectItem->getIcon(),
                'title' => $selectItem->getLabel(),
                'description' => $itemDescription['description'] ?? ($itemDescription ?? ''),
            ];

but in ExtensionManagementUtility the following lines

 if (!$selectItem->hasIcon()) {
            $iconPath = static::$packageManager->getPackage($extensionKey)->getPackageIcon();
            if ($iconPath) {
                $selectItem = $selectItem->withIcon('EXT:' . $extensionKey . '/' . $iconPath);
            }
        }

fills the icon with e.g. EXT:news/Resources/Public/Icons/Extension.svg but the NewContentElementController can only handle icon identifiers.

IMHO the selectitem should never fallback to a path and just have no icon. otherwise there might be lots of places where it again needs to be checked if it is an icon path or an icon identifier

this can be tested by changing e.g. in typo3/sysext/felogin/Configuration/TCA/Overrides/tt_content.php line 10 ('mimetypes-x-content-login',) into null,


Files


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #102834: Auto-registration of NewContentElementWizard via TCAClosed2024-01-14

Actions
Actions #1

Updated by Georg Ringer 13 days ago

  • Related to Feature #102834: Auto-registration of NewContentElementWizard via TCA added
Actions

Also available in: Atom PDF