The website should display the template's standard 404 error page (error.php
). The server should return a 404 HTTP status code, and no "CRITICAL
" error should be logged for a simple page not found event.
A "CRITICAL" error is logged, and the user may be presented with a generic server error page instead of the themed 404 page.
Log Entry:
2025-07-25T15:17:44+00:00 CRITICAL ::1 error Uncaught Throwable of type Joomla\CMS\Router\Exception\RouteNotFoundException thrown with message "Seite nicht gefunden". Stack trace: #0 [ROOT]\libraries\src\Application\SiteApplication.php(767): Joomla\CMS\Router\Router->parse(Object(Joomla\CMS\Uri\Uri), true)
#1 [ROOT]\libraries\src\Application\SiteApplication.php(243): Joomla\CMS\Application\SiteApplication->route()
#2 [ROOT]\libraries\src\Application\CMSApplication.php(304): Joomla\CMS\Application\SiteApplication->doExecute()
#3 [ROOT]\includes\app.php(58): Joomla\CMS\Application\CMSApplication->execute()
#4 [ROOT]\index.php(32): require_once('C:\\Web\\xampp\\ht...')
#5 {main}
The issue originates from how exceptions are handled in the application lifecycle.
A request for a non-existent page causes Joomla\CMS\Application\SiteApplication::route()
to throw a Joomla\CMS\Router\Exception\RouteNotFoundException
.
This exception is not caught within SiteApplication::doExecute()
, so it propagates up the call stack.
It is ultimately caught by the generic catch (\Throwable $throwable
) block within Joomla\CMS\Application\CMSApplication::execute()
.
This top-level exception handler treats all Throwable instances as critical errors, passing them to ExceptionHandler::handleException()
. It does not differentiate a standard 404 condition from a genuine 500-level server error.
The exception handler in CMSApplication::execute()
should maybe be modified to check if the caught exception is an instanceof RouteNotFoundException
and, if so, initiate the proper 404 response (set header, render template's error.php) instead of logging it as a critical failure.
Anyone familiar with that?
Labels |
Added:
No Code Attached Yet
|
@Sunil1532 we don;t assign issues
As I am beginner to open source, I have confused.
I am running into this issue when I try to save an article that has many characters. A 500 error page shows and not a 404.
I am running into this issue when I try to save an article that has many characters. A 500 error page shows and not a 404.
Since you are running into a server error and not a missing website, a 500 error is correct here.
I work on this issue. Can you please assign this issue to me