From 76ac42afa2e4458f4e5822223d92facd0d03d802 Mon Sep 17 00:00:00 2001
From: Benjamin Kott <benjamin.kott@outlook.com>
Date: Thu, 6 Jul 2023 17:57:10 +0200
Subject: [PATCH] [BUGFIX] Use specific file palettes as default for file
 references

In sys_file_reference tables a standard basic palette
is used for filetypes image, audio and video.
Therefore no alternative field is shown in own tca field types file.
Use specific file type palettes, to avoid rewriting
in overrideChildTca in type=file fields.

Resolves: #101277
Releases: main, 12.4
Change-Id: Ie47396e0876499be787f3d9ba9da94988d9f4e39
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79859
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Benjamin Kott <benjamin.kott@outlook.com>
Tested-by: Benjamin Kott <benjamin.kott@outlook.com>
---
 typo3/sysext/core/Configuration/TCA/sys_file_reference.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/typo3/sysext/core/Configuration/TCA/sys_file_reference.php b/typo3/sysext/core/Configuration/TCA/sys_file_reference.php
index 133429650fae..2744fb68fbe1 100644
--- a/typo3/sysext/core/Configuration/TCA/sys_file_reference.php
+++ b/typo3/sysext/core/Configuration/TCA/sys_file_reference.php
@@ -183,17 +183,17 @@ return [
         ],
         \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
             'showitem' => '
-				--palette--;;basicoverlayPalette,
+				--palette--;;imageoverlayPalette,
 				--palette--;;filePalette',
         ],
         \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
             'showitem' => '
-				--palette--;;basicoverlayPalette,
+				--palette--;;audioOverlayPalette,
 				--palette--;;filePalette',
         ],
         \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
             'showitem' => '
-				--palette--;;basicoverlayPalette,
+				--palette--;;videoOverlayPalette,
 				--palette--;;filePalette',
         ],
         \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
-- 
GitLab