Skip to content

Commit

Permalink
Merge branch hotfix/v2.3.25
Browse files Browse the repository at this point in the history
  • Loading branch information
roadiz-ci committed Aug 26, 2024
1 parent 63c6295 commit 4f01c88
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/services.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
parameters:
roadiz_core.cms_version: '2.3.24'
roadiz_core.cms_version: '2.3.25'
roadiz_core.cms_version_prefix: 'main'
env(APP_NAMESPACE): "roadiz"
env(APP_VERSION): "0.1.0"
Expand Down
9 changes: 9 additions & 0 deletions src/Api/Controller/GetWebResponseByPathController.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ protected function normalizeResourcePath(?Request $request, string $path): Persi

$this->addResourceToCacheTags($request, $resource);

// Set translation and locale to be used in Request context
if (null !== $resourceInfo->getTranslation()) {
$request->attributes->set('_translation', $resourceInfo->getTranslation());
}

if (null !== $resourceInfo->getLocale()) {
$request->attributes->set('_locale', $resourceInfo->getLocale());
}

/*
* Or plain entity
*/
Expand Down

0 comments on commit 4f01c88

Please sign in to comment.