Issue Bug Closed

#83468Custom icon for "Folder" is not shown

Soren Malling 01/04/18, 14:01 updated 09/18/23, 10:00

Description

I’ve registered a custom icon for the “Contains” selector in “Page Properties”. the code is here

if (TYPO3_MODE === 'BE') {
    /** @var \TYPO3\CMS\Core\Imaging\IconRegistry $iconRegistry */
    $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
    $iconRegistry->registerIcon(
        'apps-pagetree-folder-contains-partnerads',
        \TYPO3\CMS\Core\Imaging\IconProvider\FontawesomeIconProvider::class,
        [
            'name' => 'rss'
        ]
    );
}

Notice it’s a FontAwesome provided icon – dunno if that could cause the missing rendering of the icon

The custom icon is not being displayed in the page tree (see screenshot) but is working as identifier for ex. TCA tables.

!Screen Shot 2018-01-04 at 13.51.18.png!

Choosing the “frontend user” as “Module” gives the expected rendering of the icon, so the support for SVGIcons is working

The icons doesn’t seem to be registered in the <defs> part of the pagetree, could that be a reason?</defs>

!Screen Shot 2018-01-04 at 14.00.07.png!

Reviews 0

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

Files 4

History 8

  1. Tymoteusz Motylewski commented 01/08/18, 14:32

    you’re right, FontAwesome icons are not supported yet unfortunatelly, as they are not rendered inline.
    Need to think how can we support that.

  2. Georg Ringer changed status New Accepted 01/09/18, 06:42

  3. Rémy DANIEL commented and changed attached Sélection_997.png 12/06/19, 18:53

    Attached another screenshot taken on 9.5.
    The fontawesome icon is correctly display except in the page tree.

    Sélection_997.png

  4. Vasyl Mosiychuk commented 12/06/19, 21:34

    I have the same problem with the custom icons for the custom of the page type

  5. Henrik Elsner commented 03/15/22, 10:31

    i got the same issue with v10

  6. Benni Mack commented and changed attached Screenshot 2022-11-03 at 21.18.05.png status Accepted Needs Feedback 11/03/22, 20:20

    Hey everyone,

    I tried to reproduce this with v11 LTS and v12.

    This is what I have:

    EXT:my_ext/Configuration/Icons.php

    <?php
    
    return [
        'apps-pagetree-folder-contains-partnerads' => [
            'provider' => \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
            'source' => 'EXT:redirects/Resources/Public/Icons/mimetypes-x-sys_redirect.svg',
        ],
    ];

    EXT:my_ext/Configuration/TCA/Overrides/my_module.php

    <?php
    
    $GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-partnerads'] = 'apps-pagetree-folder-contains-partnerads';
    $GLOBALS['TCA']['pages']['columns']['module']['config']['items'][] = ['Partner Ads', 'partnerads', 'apps-pagetree-folder-contains-partnerads'];

    I also attached a screenshot on how it looks… Did I miss something?

  7. Wolfgang Klinger commented 11/16/22, 09:15

    @benni yes, that this ticket is about FontawesomeIconProvider ;)

  8. Christian Kuhn commented and changed status Needs Feedback Closed 09/18/23, 10:00

    Hey. I hope it is ok to close here: FontawesomeIconProvider has been removed in v12, and we will most likely not change anything in v11 in this area anymore. Feel free to re-open or re-discuss in case we bissed something.