Project

General

Profile

Actions

Bug #87497

closed

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

Added by Leonie Philine almost 6 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Documentation
Start date:
2019-01-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

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

Actions #1

Updated by Benni Mack over 5 years ago

  • Target version changed from next-patchlevel to Candidate for patchlevel
Actions #2

Updated by Susanne Moog over 4 years ago

  • Status changed from New to Needs Feedback

This report does not seem to be valid, as in fact `$recordType0 = 'tcarecords-' . $table . '-default';` is also called in IconFactory in case `typeicon_column` is set - see https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/Imaging/IconFactory.php#L228

Actions #3

Updated by Christian Kuhn almost 3 years ago

  • Status changed from Needs Feedback to Closed

hmm. i hope it's ok to close here: it seems the docs got an update in this area and the code also looks different now.

Actions

Also available in: Atom PDF