From 3f774fcab11bb772825bbdfa9f0adce1c2ba5d43 Mon Sep 17 00:00:00 2001
From: Oliver Bartsch <bo@cedev.de>
Date: Tue, 6 Aug 2024 16:41:06 +0200
Subject: [PATCH] [BUGFIX] Render empty icon instead of invalid identifier

This additionally resolves a display bug, since the
elements without an icon were moving to the left
and are now properly in line with the elements,
having an icon.

Resolves: #104558
Related: #103663
Releases: main
Change-Id: I0dc0c0affc1c206a3fa83981804cf818ea51fed3
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/85535
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
---
 Build/Sources/TypeScript/backend/new-record-wizard.ts           | 2 +-
 .../backend/Resources/Public/JavaScript/new-record-wizard.js    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Build/Sources/TypeScript/backend/new-record-wizard.ts b/Build/Sources/TypeScript/backend/new-record-wizard.ts
index b48292d2ff1c..2d4973e334e1 100644
--- a/Build/Sources/TypeScript/backend/new-record-wizard.ts
+++ b/Build/Sources/TypeScript/backend/new-record-wizard.ts
@@ -507,7 +507,7 @@ export class NewRecordWizard extends LitElement {
         @click="${(event: PointerEvent): void => { event.preventDefault(); this.handleItemClick(item); }}"
       >
         <div class="item-icon">
-          <typo3-backend-icon identifier="${item.icon}" size="medium"></typo3-backend-icon>
+          <typo3-backend-icon identifier="${item.icon || 'empty-empty'}" size="medium"></typo3-backend-icon>
         </div>
         <div class="item-body">
           <div class="item-body-label">${item.label}</div>
diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/new-record-wizard.js b/typo3/sysext/backend/Resources/Public/JavaScript/new-record-wizard.js
index 1df9ed2e0c0c..064ad20cf4da 100644
--- a/typo3/sysext/backend/Resources/Public/JavaScript/new-record-wizard.js
+++ b/typo3/sysext/backend/Resources/Public/JavaScript/new-record-wizard.js
@@ -75,7 +75,7 @@ var __decorate=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Obj
         @click="${t=>{t.preventDefault(),this.handleItemClick(e)}}"
       >
         <div class="item-icon">
-          <typo3-backend-icon identifier="${e.icon}" size="medium"></typo3-backend-icon>
+          <typo3-backend-icon identifier="${e.icon||"empty-empty"}" size="medium"></typo3-backend-icon>
         </div>
         <div class="item-body">
           <div class="item-body-label">${e.label}</div>
-- 
GitLab