diff --git a/typo3/sysext/core/Classes/Imaging/IconFactory.php b/typo3/sysext/core/Classes/Imaging/IconFactory.php index 582073bfca0924642593c76a026db897ce07153a..ae96d329d4c32c90035c62d639207444f0fd0775 100644 --- a/typo3/sysext/core/Classes/Imaging/IconFactory.php +++ b/typo3/sysext/core/Classes/Imaging/IconFactory.php @@ -205,7 +205,7 @@ class IconFactory ); } else { $suffix = (int)$row['nav_hide'] === 0 ? 'contentFromPid' : 'contentFromPid-hideinmenu'; - $recordType[4] = $this->getRecordTypeForPageType($recordType[1], $suffix, $table); + $recordType[4] = $this->getRecordTypeForPageType($recordType[1], $suffix, $table, 'page'); } } } @@ -297,13 +297,13 @@ class IconFactory * @param string $table * @return string */ - protected function getRecordTypeForPageType(string $typeName, string $suffix, string $table): string + protected function getRecordTypeForPageType(string $typeName, string $suffix, string $table, string $fallbackTypeName = '1'): string { $recordType = $typeName . '-' . $suffix; // Check if typeicon class exists. If not fallback to page as typeName if (!isset($GLOBALS['TCA'][$table]['ctrl']['typeicon_classes'][$recordType])) { - $recordType = 'page-' . $suffix; + $recordType = $fallbackTypeName . '-' . $suffix; } return $recordType; }