diff --git a/src/Service/Serializer/Denormalizer/Search/DataObjectSearchResultDenormalizer.php b/src/Service/Serializer/Denormalizer/Search/DataObjectSearchResultDenormalizer.php index f392af31..d3815fa4 100644 --- a/src/Service/Serializer/Denormalizer/Search/DataObjectSearchResultDenormalizer.php +++ b/src/Service/Serializer/Denormalizer/Search/DataObjectSearchResultDenormalizer.php @@ -48,12 +48,14 @@ public function denormalize( $searchResultItem = new DataObjectSearchResultItem(); } + $published = SystemField::TYPE->getData($data) === 'folder' || SystemField::PUBLISHED->getData($data); + return $searchResultItem ->setId(SystemField::ID->getData($data)) ->setClassName(SystemField::CLASS_NAME->getData($data) ?? '') ->setParentId(SystemField::PARENT_ID->getData($data)) ->setType(SystemField::TYPE->getData($data)) - ->setPublished(SystemField::PUBLISHED->getData($data)) + ->setPublished($published) ->setKey(SystemField::KEY->getData($data)) ->setPath(SystemField::PATH->getData($data)) ->setFullPath(SystemField::FULL_PATH->getData($data))