Skip to content

Commit

Permalink
fix error page code 404 can not CMS preview
Browse files Browse the repository at this point in the history
  • Loading branch information
pack254 committed Oct 31, 2024
1 parent 208b365 commit ec76d40
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 ec76d40

Please sign in to comment.