From 4ba85136d1d489ca0204ed8eac66c635125e21aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20H=C3=B6rner?= Date: Thu, 12 Dec 2024 12:23:00 +0100 Subject: [PATCH] [BUGFIX] Respect foreignLabel in related items from mm table Fixes: #4255 Ports: #4256 --- Classes/ContentObject/Relation.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Classes/ContentObject/Relation.php b/Classes/ContentObject/Relation.php index 3f4f8dd9d..cde91d009 100644 --- a/Classes/ContentObject/Relation.php +++ b/Classes/ContentObject/Relation.php @@ -184,7 +184,11 @@ protected function getRelatedItemsFromMMTable(string $localTableName, int $local $record = $this->getFrontendOverlayService()->getOverlay($foreignTableName, $record); } - $relatedItems[] = $contentObject->stdWrap($record[$foreignTableLabelField] ?? '', $this->configuration) ?? ''; + $relatedItems[] = $contentObject->stdWrapValue( + 'foreignLabel', + $this->configuration, + $contentObject->stdWrap($record[$foreignTableLabelField] ?? '', $this->configuration) ?? '' + ); } return $relatedItems;