Skip to content

Commit

Permalink
Merge branch 'master' into fix_#105
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalmoser committed Oct 25, 2022
2 parents f789f9b + 47c969d commit b278531
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Upgrade Notes


## 4.1.0
- [BUGFIX] I18nContext is missing in static routes if fallback document is an instance of Document\Link [#105](https://github.com/dachcom-digital/pimcore-i18n/issues/105)

## 4.0.6
- [BUGFIX] Fix missing site attribute in error page [#107](https://github.com/dachcom-digital/pimcore-i18n/issues/107)
## 4.0.5
- [BUGFIX] Wrong Error Page in Static Route Context [@Zodiarc](https://github.com/dachcom-digital/pimcore-i18n/issues/96)
- [BUGFIX] Properly overriding Pimcore ResponseExceptionListener and multisite error page [@Zodiarc](https://github.com/dachcom-digital/pimcore-i18n/pull/101)

## 4.0.4
- [IMPROVEMENT] Check against `isFrontendRequestByAdmin` in route item builder
## 4.0.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,14 @@ protected function handleErrorPage(ExceptionEvent $event): void
$this->enablePimcoreContext();

try {
$response = $this->documentRenderer->render($document, [
'exception' => $exception,
$attributes = [
'exception' => $exception,
PimcoreContextListener::ATTRIBUTE_PIMCORE_CONTEXT_FORCE_RESOLVING => true,
]);
];
if ($request->attributes->has(SiteResolver::ATTRIBUTE_SITE)) {
$attributes[SiteResolver::ATTRIBUTE_SITE] = $request->attributes->get(SiteResolver::ATTRIBUTE_SITE);
}
$response = $this->documentRenderer->render($document, $attributes);
} catch (\Exception $e) {
// we are even not able to render the error page, so we send the client a unicorn
$response = 'Page not found. 🦄';
Expand Down

0 comments on commit b278531

Please sign in to comment.