No Code Attached Yet
avatar MarcelSchuermann
MarcelSchuermann
25 Jul 2025

Steps to reproduce the issue

  1. Set up a standard Joomla 5.x installation.
  2. In Global Configuration -> Logging, enable logging to capture errors.
  3. Navigate to any URL on the frontend that does not exist.

Expected result

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.

Actual result

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}

System information

  • Joomla! Version: 5.3.2
  • PHP Version: (8.3)
  • Web Server: (Apache, XAMPP)
  • Database: (mariaDb)
  • Template: Helix Ulitmate 2.1.3

Additional comments

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?

avatar MarcelSchuermann MarcelSchuermann - open - 25 Jul 2025
avatar joomla-cms-bot joomla-cms-bot - change - 25 Jul 2025
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Jul 2025
avatar Sunil1532
Sunil1532 - comment - 26 Jul 2025

I work on this issue. Can you please assign this issue to me

avatar brianteeman
brianteeman - comment - 26 Jul 2025

@Sunil1532 we don;t assign issues

avatar Sunil1532
Sunil1532 - comment - 26 Jul 2025

As I am beginner to open source, I have confused.

avatar dallen72
dallen72 - comment - 31 Jul 2025

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.

avatar Hackwar
Hackwar - comment - 1 Aug 2025

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.

Add a Comment

Login with GitHub to post a comment