From 1485af2ab6bfeb2875d17d909e088d7628f13cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Parafi=C5=84ski?= Date: Thu, 21 Nov 2024 10:31:18 +0100 Subject: [PATCH] IBX-8534: Fixed missing loadRelation method on ContentHandler (#79) * IBX-8534: Fixed missing loadRelation method on ContentHandler * Update src/lib/FieldMapper/ContentTranslationFieldMapper/ContentDocumentFulltextFields.php Co-authored-by: Konrad Oboza --------- Co-authored-by: Konrad Oboza --- .../ContentDocumentFulltextFields.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/FieldMapper/ContentTranslationFieldMapper/ContentDocumentFulltextFields.php b/src/lib/FieldMapper/ContentTranslationFieldMapper/ContentDocumentFulltextFields.php index 8eb6991e..1db71b0a 100644 --- a/src/lib/FieldMapper/ContentTranslationFieldMapper/ContentDocumentFulltextFields.php +++ b/src/lib/FieldMapper/ContentTranslationFieldMapper/ContentDocumentFulltextFields.php @@ -175,7 +175,11 @@ private function doMapFields(Content $content, ContentType $contentType, $langua */ private function doMapRelatedFields(Content $sourceContent, $languageCode, $maxDepth, $depth) { - $relations = $this->contentHandler->loadRelations($sourceContent->versionInfo->contentInfo->id); + $sourceContentId = $sourceContent->versionInfo->contentInfo->id; + $relations = $this->contentHandler->loadRelationList( + $sourceContentId, + $this->contentHandler->countRelations($sourceContentId) + ); $relatedContents = $this->contentHandler->loadContentList( array_map(static function (Content\Relation $relation) {