Project

General

Profile

Actions

Bug #103663

closed

Broken icons in Content Element wizard with auto registration

Added by Georg Ringer 7 months ago. Updated about 1 month ago.

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

100%

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 2 (0 open2 closed)

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

Actions
Related to TYPO3 Core - Bug #104558: Render empty icon instead of invalid identifierClosedOliver Bartsch2024-08-06

Actions
Actions

Also available in: Atom PDF