Bug #80844

Registering an Extbase BE module with an iconIdentifier falsely falls back to the default icon if the icon is not explicitly unset

Added by Simon Schaufelberger about 3 years ago. Updated 2 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2017-04-13
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

This code snippet worked in TYPO3 7 while in TYPO3 8 the extbase icon is shown:

using: iconIdentifier

$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
    \TYPO3\CMS\Core\Imaging\IconRegistry::class
);
$iconRegistry->registerIcon(
    'module-seo',
    \TYPO3\CMS\Core\Imaging\IconProvider\FontawesomeIconProvider::class,
    ['name' => 'bullseye']
);

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
    $_EXTKEY,
    'metaseo',
    '',
    '',
    [],
    [
        'access' => 'user,group',
        'iconIdentifier' => 'module-seo',
        'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/ModuleMain/locallang.xlf',
    ]
);

in TYPO3 8 i need to "unset" the extbase icon which gets merged into the options array:

'icon' => '',
'iconIdentifier' => 'module-seo',

related commits:
https://github.com/TYPO3/TYPO3.CMS/commit/241497a2ab5e34501ead41106e021de0145b8332
https://github.com/TYPO3/TYPO3.CMS/commit/562b7c1d19d29579f86082596c6493207b2d4da8

I'm quite sure this piece of code is responsible for it:

https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php#L942-L953

See also: https://github.com/mblaschke/TYPO3-metaseo/pull/417

Associated revisions

Revision ddb17547 (diff)
Added by Georg Ringer 3 months ago

[BUGFIX] Prioritize iconIdentifier over default icon for extbase modules

If ExtensionUtility::registerModule is called with a module
configuration only containing an icon identifier the default icon of
extbase is unset.

Resolves: #80844
Releases: master, 9.5
Change-Id: I879b4fad2c6881fface0d64581c031b6ac7589eb
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63612
Tested-by: TYPO3com <>
Tested-by: Susanne Moog <>
Tested-by: Benni Mack <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Benni Mack <>

Revision 53be6641 (diff)
Added by Georg Ringer 3 months ago

[BUGFIX] Prioritize iconIdentifier over default icon for extbase modules

If ExtensionUtility::registerModule is called with a module
configuration only containing an icon identifier the default icon of
extbase is unset.

Resolves: #80844
Releases: master, 9.5
Change-Id: I879b4fad2c6881fface0d64581c031b6ac7589eb
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63585
Tested-by: TYPO3com <>
Tested-by: Benni Mack <>
Reviewed-by: Benni Mack <>

History

#1 Updated by Simon Schaufelberger about 3 years ago

  • Description updated (diff)

#2 Updated by Stefan P over 2 years ago

  • Subject changed from Using fontawesome icon falls back to extbase icon to Registering an Extbase BE module with an iconIdentifier falsely falls back to the default icon if the icon is not explicitly unset

Can confirm. I use 'icon' => null alongside 'iconIdentifier' => 'my-icon' to make it work.

#3 Updated by Simon Schaufelberger over 2 years ago

  • Description updated (diff)

#4 Updated by Susanne Moog over 2 years ago

  • Category set to Extbase

#5 Updated by Gerrit Code Review 3 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63612

#6 Updated by Gerrit Code Review 3 months ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63585

#7 Updated by Georg Ringer 3 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#8 Updated by Benni Mack 2 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF