User tests: Successful: Unsuccessful:
Pull Request for Issue # .
Our error page contains modules, however the module renderer will crash when error happen before the Application initialization is completed. This leads to mixed error report by Symfony error handler.
Apply patch.
Add throw new \Exception('Test error'); around here
joomla-cms/libraries/src/Application/CMSApplication.php
Lines 301 to 304 in ffe1acf
$this->doExecute();
And then visit the site and the administration area.
You will get a red page of Symfony error handler.
If you have debug enabled it will show unrelated error (something about access to undefined method or kind of that) and 2 exception traces.
You will get Joomla error page.
If you have debug enabled it also will show the error trace.
Please select:
| Status | New | ⇒ | Pending |
| Category | ⇒ | Administration Templates (admin) Libraries Front End Templates (site) |
| Labels |
Added:
bug
PR-5.4-dev
|
||
Did you placed the Exception in the place as in the test description, before doExecute method or after?
If it was "after" then you will not see any difference.
Yes. I see the correct error page but not with the error-500 module
Ah sorry, I read your comment incorrectly.
Yes that is correct, there will be no error-500 module. The idea of the PR is do not render any module in such situations.
Because it is not possible at that stage of the Application, the module renderrer will throw another error because the application initialization is incomplete.
I have tested this item ✅ successfully on 6ba485a
With the patch still applied I could login to the backend normally.
I have tested this item ✅ successfully on 6ba485a
Tested with JBT:
LangActiveAssetItem.php was displayed at the topCMSApplication.php:303 was displayed.| Status | Pending | ⇒ | Ready to Commit |
RTC
| Labels |
Added:
RTC
|
||
| Status | Ready to Commit | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-11-08 12:07:42 |
| Closed_By | ⇒ | richard67 |
Thanks @Fedik for this bug fix, @brianteeman for review, and @ceford and @muhme for testing.
As far as I can tell a module assigned to error-500 is still not displayed
I forced the error page with
throw new \Exception('Test error', 500);and had a module published in the position error-500