From e82dc97fbf98c19e3e92962fad2ca308d8f971a2 Mon Sep 17 00:00:00 2001 From: "alexander.vogt" <alexander.vogt@avenit.de> Date: Tue, 3 Jan 2023 11:42:30 +0100 Subject: [PATCH] [BUGFIX] Properly localize placeholder Due to the introduction of the "language" TCA type, the column processing of TCA language fields in TcaSelectItems->addData was skipped and therefore the array conversion through the "processDatabaseFieldValue" method was no longer applied. The placeholder processing in TcaInputPlaceholders however expected the tables language field to be an array. This is now fixed. Resolves: #99446 Releases: main, 11.5 Change-Id: I20f456ba7066c19d2eded00079e58c4c64521eeb Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77265 Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: core-ci <typo3@b13.com> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> --- .../Classes/Form/FormDataProvider/TcaInputPlaceholders.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInputPlaceholders.php b/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInputPlaceholders.php index 8357bb1bf7b9..9c3b8a77f17b 100644 --- a/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInputPlaceholders.php +++ b/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInputPlaceholders.php @@ -140,7 +140,7 @@ class TcaInputPlaceholders implements FormDataProviderInterface if (!empty($GLOBALS['TCA'][$result['tableName']]['ctrl']['languageField']) && isset($result['databaseRow'][$GLOBALS['TCA'][$result['tableName']]['ctrl']['languageField']]) ) { - $relatedFormData['currentSysLanguage'] = $result['databaseRow'][$GLOBALS['TCA'][$result['tableName']]['ctrl']['languageField'] ?? null][0] ?? ''; + $relatedFormData['currentSysLanguage'] = $result['databaseRow'][$GLOBALS['TCA'][$result['tableName']]['ctrl']['languageField']]; } $value = $this->getPlaceholderValue($fieldNameArray, $relatedFormData, $recursionLevel + 1); } -- GitLab