diff --git a/Core/API/ComplexFields/EzImage.php b/Core/API/ComplexFields/EzImage.php index e9fc2463..380e897b 100644 --- a/Core/API/ComplexFields/EzImage.php +++ b/Core/API/ComplexFields/EzImage.php @@ -23,13 +23,14 @@ public function createValue() $migrationDir = $this->container->getParameter('kaliop_bundle_migration.version_directory'); $bundlePath = $this->bundle->getPath(); $filePath = $bundlePath . '/' . $migrationDir . '/images/' . $imageData['path']; + $altText = array_key_exists('alt_text', $imageData) ? $imageData['alt_text'] : ''; $value = new ImageValue( array( 'path' => $filePath, 'fileSize' => filesize($filePath), 'fileName' => basename($filePath), - 'alternativeText' => $imageData['alt_text'] + 'alternativeText' => $altText ) ); diff --git a/Core/API/Managers/ContentManager.php b/Core/API/Managers/ContentManager.php index c7b468e9..922be8b3 100644 --- a/Core/API/Managers/ContentManager.php +++ b/Core/API/Managers/ContentManager.php @@ -109,7 +109,13 @@ public function update() if ($this->isReference($remoteId)) { $remoteId = $this->getReference($remoteId); } - $contentInfo = $contentService->loadContentInfoByRemoteId($remoteId); + + try { + $contentInfo = $contentService->loadContentInfoByRemoteId($remoteId); + } catch (\eZ\Publish\API\Repository\Exceptions\NotFoundException $e) { + $location = $this->repository->getLocationService()->loadLocationByRemoteId($remoteId); + $contentInfo = $location->contentInfo; + } } $contentType = $contentTypeService->loadContentType($contentInfo->contentTypeId);