From 7787ac0970bac44defcce67a6eb0366ba73297a1 Mon Sep 17 00:00:00 2001 From: Felix Gradinaru Date: Fri, 13 Sep 2024 11:06:14 +0200 Subject: [PATCH] BUGFIX: When syncing properties, only get node identifiers in reference properties --- Classes/ContentRepository/NodeTranslationService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/ContentRepository/NodeTranslationService.php b/Classes/ContentRepository/NodeTranslationService.php index 51e37d4..cfcc0ff 100644 --- a/Classes/ContentRepository/NodeTranslationService.php +++ b/Classes/ContentRepository/NodeTranslationService.php @@ -190,7 +190,8 @@ public function translateNode(NodeInterface $sourceNode, NodeInterface $targetNo return; } - $properties = (array)$sourceNode->getProperties(); + // The "true" here is necessary to receive referenced nodes just as identifiers and not as objects! + $properties = (array)$sourceNode->getProperties(true); $propertiesToTranslate = []; foreach ($properties as $propertyName => $propertyValue) { if (empty($propertyValue) || !is_string($propertyValue)) {