Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions classes/core/PKPApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
use PKP\site\Version;
use PKP\site\VersionDAO;
use PKP\submission\RepresentationDAOInterface;
use TemplateManager;

interface iPKPApplicationInfoProvider
{
Expand Down Expand Up @@ -435,8 +436,13 @@ public function execute(): void
}
} catch (\Symfony\Component\HttpKernel\Exception\NotFoundHttpException) {
header('HTTP/1.0 404 Not Found');
echo "<h1>404 Not Found</h1>\n";
exit;
$templateMgr = TemplateManager::getManager($this->getRequest());
$templateMgr->assign([
'pageTitle' => 'api.404.resourceNotFound',
'errorMsg' => '',
'errorParams' => [],
]);
$templateMgr->display('frontend/pages/error.tpl');
} catch (\Symfony\Component\HttpKernel\Exception\GoneHttpException) {
header('HTTP/1.0 410 Gone');
echo "<h1>404 Not Found</h1>\n";
Expand Down
2 changes: 1 addition & 1 deletion pages/management/ManagementHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ public function editUser(array $args, $request): void
$invitationHandler = $invitation->getInvitationUIActionRedirectController();
$invitationHandler->createHandle($request,$userId);
} else {
$request->getDispatcher()->handle404();
throw new \Symfony\Component\HttpKernel\Exception\NotFoundHttpException();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please double-check this change. I believe it is correct.

}
}

Expand Down