Skip to content

Commit

Permalink
Merge pull request #49 from sitegeist/bugfix-only-get-node-identifiers
Browse files Browse the repository at this point in the history
BUGFIX: Get reference properties only as node identifier arrays
  • Loading branch information
mficzel authored Sep 20, 2024
2 parents f4c2c07 + 7787ac0 commit aad7d08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/ContentRepository/NodeTranslationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit aad7d08

Please sign in to comment.