Bug #103663
closedBroken icons in Content Element wizard with auto registration
100%
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