Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX: Handle unavailable asset proxies in edit view #2771

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 3 additions & 9 deletions Neos.Media.Browser/Classes/Controller/AssetController.php
Expand Up @@ -348,9 +348,7 @@ public function showAction(string $assetSourceIdentifier, string $assetProxyIden
'assetProxy' => $assetProxy,
'assetCollections' => $this->assetCollectionRepository->findAll()
]);
} catch (AssetNotFoundExceptionInterface $e) {
$this->throwStatus(404, 'Asset not found');
} catch (AssetSourceConnectionExceptionInterface $e) {
} catch (AssetNotFoundExceptionInterface | AssetSourceConnectionExceptionInterface $e) {
$this->view->assign('connectionError', $e);
}
}
Expand Down Expand Up @@ -403,9 +401,7 @@ public function editAction(string $assetSourceIdentifier, string $assetProxyIden
'assetSource' => $assetSource,
'canShowVariants' => ($assetProxy instanceof NeosAssetProxy) && ($assetProxy->getAsset() instanceof VariantSupportInterface)
]);
} catch (AssetNotFoundExceptionInterface $e) {
$this->throwStatus(404, 'Asset not found');
} catch (AssetSourceConnectionExceptionInterface $e) {
} catch (AssetNotFoundExceptionInterface | AssetSourceConnectionExceptionInterface $e) {
$this->view->assign('connectionError', $e);
}
}
Expand Down Expand Up @@ -448,9 +444,7 @@ public function variantsAction(string $assetSourceIdentifier, string $assetProxy
'originalInformation' => (new ImageMapper($asset))->getMappingResult(),
'variantsInformation' => $variantInformation
]);
} catch (AssetNotFoundExceptionInterface $e) {
$this->throwStatus(404, 'Original asset not found');
} catch (AssetSourceConnectionExceptionInterface $e) {
} catch (AssetNotFoundExceptionInterface | AssetSourceConnectionExceptionInterface $e) {
$this->view->assign('connectionError', $e);
}
}
Expand Down