81701[BUGFIX] Show correct icon for page types in UserInformationService
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Oli Bartsch +1
-
Verified V +2 Done
- Benni Mack +2
- Oli Bartsch +1
- core-ci +1 CI
Issues 1
Files 1
Review log 79
-
Achim Fritz uploaded patch set 1 11/07/23, 12:06
-
core-ci voted on patch set 1 V +1 11/07/23, 12:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48687
-
Garvin Hicking commented on patch set 1 11/07/23, 15:30
Thanks for providing a fix to the issue you find, I hope my comment is useful (couldn't try it out myself though)Maybe a bit too short, suggestion: [BUGFIX] Use fallback page icon when no doktype icon is defined ?Suggestion: The page types section of the User Detail View in the BackendUsers Module showed a PHP warning, in case no icon was defined for a page type. This fix uses the proper fallback chain to resolve the icon to a default (apps-pagetree-page-default).UserInformationService.php:234Dropping the lookup to `mapRecordTypeToIconIdentifier` doesn't seem right to me at this point? That method actually has a fallback to return `getDefaultIconIdentifier`. It seems to me (not verified) that $specialItem['icon'] is unset and yields the error message, so have you maybe tried this instead: ``` $icon = $this->iconFactory->mapRecordTypeToIconIdentifier('pages', ['doktype' => ($specialItem['icon'] ?? '')]); ``` Having an empty string then could maybe resolve the fallback properly, but also still utilize mapping usual records types? -
Oli Bartsch updated the commit message in patch set 2
V +111/08/23, 17:57 -
Oli Bartsch updated the commit message in patch set 3 11/08/23, 17:57
-
Oli Bartsch commented on patch set 3 V +1 CR +1 11/08/23, 17:57
Reply
DoneReply
DoneUserInformationService.php:234ReplyThe $specialItem['icon'] already contains the correct icon identifier. Passing this value as "doktype" leads to the fact that the method will always fall back to the default icon. This means, dropping the method is the right fix IMO. -
core-ci voted on patch set 3 V +1 11/08/23, 18:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48728
-
Benni Mack voted on patch set 3 V +2 CR +2 11/09/23, 09:10
-
Benni Mack merged patch set 4 11/09/23, 09:10