diff --git a/eZ/Publish/Core/Repository/LocationResolver/PermissionAwareLocationResolver.php b/eZ/Publish/Core/Repository/LocationResolver/PermissionAwareLocationResolver.php index 44b7269d76..561b2fb288 100644 --- a/eZ/Publish/Core/Repository/LocationResolver/PermissionAwareLocationResolver.php +++ b/eZ/Publish/Core/Repository/LocationResolver/PermissionAwareLocationResolver.php @@ -44,7 +44,7 @@ public function resolveLocation(ContentInfo $contentInfo): Location } catch (NotFoundException | UnauthorizedException $e) { // try different locations if main location is not accessible for the user $locations = $this->locationService->loadLocations($contentInfo); - if (empty($locations)) { + if (empty($locations) || null === $contentInfo->mainLocationId) { throw $e; }