Issue Bug Closed

#87497TCA ctrl typeicon_column reference falsely claims default icon is `iconfile` value

Leonie Philine 01/19/19, 21:55 updated 02/19/22, 13:44

Description

There is a false claim in [1], saying:
> “the default icon is the one defined with the iconfile value.”

This is false:

\TYPO3\CMS\Core\Imaging\IconFactory::mapRecordTypeToIconIdentifier() skips 'tcarecords-' . $table . '-default' altogether, when isset($GLOBALS['TCA'][$table]['ctrl']['typeicon_column']) evaluates to true.

Therefore, typeicon_column must always contain a default key mapping to an existing icon (which means you need to duplicate iconfile, but this time as icon identifier rather than as file path).
@iconfile@ is not even considered (e.g. in the List > New Record view) for typeicon_column-enabled tables.

You can choose if this is a code bug in \TYPO3\CMS\Core\Imaging\IconFactory::mapRecordTypeToIconIdentifier() or a documentation bug in [1].

—-
1 https://docs.typo3.org/typo3cms/TCAReference/Ctrl/#ctrl-reference-typeicon-column

Reviews 0

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