diff --git a/bundle/Routing/UrlAliasGenerator.php b/bundle/Routing/UrlAliasGenerator.php index 6af13c96..f4d5f172 100644 --- a/bundle/Routing/UrlAliasGenerator.php +++ b/bundle/Routing/UrlAliasGenerator.php @@ -27,16 +27,21 @@ public function __construct( $this->configResolver = $configResolver; } - public function loadLocation($locationId): Location + public function loadLocation($locationId, ?array $languages = null): Location { - $isSiteApiPrimaryContentView = $this->configResolver->getParameter('ng_site_api.site_api_is_primary_content_view'); + $isSiteApiPrimaryContentView = $this->configResolver->getParameter( + 'ng_site_api.site_api_is_primary_content_view', + ); if (!$isSiteApiPrimaryContentView) { - return parent::loadLocation($locationId); + return parent::loadLocation($locationId, $languages); } return $this->repository->sudo( - static fn (Repository $repository) => $repository->getLocationService()->loadLocation($locationId, []), + static fn (Repository $repository) => $repository->getLocationService()->loadLocation( + $locationId, + $languages, + ), ); } } diff --git a/composer.json b/composer.json index d9e1528c..ec2c8a93 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "require": { "php": ">=8.1", "ext-dom": "*", - "ibexa/core": "^4.6", + "ibexa/core": "^4.6.5", "ibexa/http-cache": "^4.6", "ibexa/fieldtype-richtext": "^4.6", "netgen/ibexa-search-extra": "^3.0",