From 3333eed98094ab02fae8b0fd4460f7b1ea503f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 4 Nov 2026 12:01:07 +0100 Subject: [PATCH] fix: slide images are shown in the backend again The TYPO3 13 Rector migration turned the slide image column into type=file, which matches file references by column name ("image"). The existing references were stored as "images" by getFileFieldTCAConfig, so the backend showed no images and flagged the required field. The references are renamed to "image" by a one-off SQL migration. Until that has run, the slider processor falls back to "images" so the frontend keeps working regardless of order. The fallback is removed afterwards. Co-Authored-By: Claude Opus 5.5 --- .../Classes/DataProcessing/SliderProcessor.php | 12 ++++++++++-- .../TCA/tx_eptheme_domain_model_slide.php | 2 -- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/ep_theme/Classes/DataProcessing/SliderProcessor.php b/packages/ep_theme/Classes/DataProcessing/SliderProcessor.php index 8f6a3df..fdca1c9 100644 --- a/packages/ep_theme/Classes/DataProcessing/SliderProcessor.php +++ b/packages/ep_theme/Classes/DataProcessing/SliderProcessor.php @@ -52,11 +52,19 @@ class SliderProcessor implements DataProcessorInterface $fileRepository = GeneralUtility::makeInstance(FileRepository::class); foreach ($slides as $slide) { $processedData['slides'][$slide['uid']] = $slide; - $processedData['slides'][$slide['uid']]['image'] = $fileRepository->findByRelation( + $images = $fileRepository->findByRelation( 'tx_eptheme_domain_model_slide', - 'images', + 'image', $slide['uid'] ); + if ([] === $images) { + $images = $fileRepository->findByRelation( + 'tx_eptheme_domain_model_slide', + 'images', + $slide['uid'] + ); + } + $processedData['slides'][$slide['uid']]['image'] = $images; } } diff --git a/packages/ep_theme/Configuration/TCA/tx_eptheme_domain_model_slide.php b/packages/ep_theme/Configuration/TCA/tx_eptheme_domain_model_slide.php index 859b255..8f10aa0 100644 --- a/packages/ep_theme/Configuration/TCA/tx_eptheme_domain_model_slide.php +++ b/packages/ep_theme/Configuration/TCA/tx_eptheme_domain_model_slide.php @@ -157,8 +157,6 @@ return [ 'exclude' => 0, 'label' => 'Bild', 'config' => [ - // TODO: Important! Verify that the fieldname value in foreign table either matches the column name - // or is set properly in the following TCA, see https://docs.typo3.org/permalink/t3tca:confval-inline-foreign-match-fields 'type' => 'file', 'allowed' => 'jpg,jpeg', 'appearance' => [