Skip to content

Commit

Permalink
Merge pull request #905 from pack254/bugfix/error-page-404-can-not-cm…
Browse files Browse the repository at this point in the history
…s-preview

fix error page code 404 can not preview on CMS
  • Loading branch information
tractorcow authored Dec 3, 2024
2 parents fb2c518 + 00a1537 commit 19d9b1c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Middleware/LocaleSwitchRedirector.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function process(HTTPRequest $request, callable $delegate)
if ($response->getStatusCode() === 404
&& !$state->getIsFrontend()
&& $this->getParamLocale($request)
&& !$request->getVar('CMSPreview')
) {
// Redirect to the CMS home page if the requested page doesn't exist
$response = new HTTPResponse();
Expand Down

0 comments on commit 19d9b1c

Please sign in to comment.