Skip to content

Conversation

@Fedik
Copy link
Member

@Fedik Fedik commented Oct 12, 2025

Pull Request for Issue # .

Summary of Changes

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.

Testing Instructions

Apply patch.
Add throw new \Exception('Test error'); around here

$this->createExtensionNamespaceMap();
// Perform application routines.
$this->doExecute();

But before $this->doExecute();

And then visit the site and the administration area.

Actual result BEFORE applying this Pull Request

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.

Expected result AFTER applying this Pull Request

You will get Joomla error page.

If you have debug enabled it also will show the error trace.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:
  • No documentation changes for docs.joomla.org needed
  • Pull Request link for manual.joomla.org:
  • No documentation changes for manual.joomla.org needed

@Fedik Fedik requested a review from chmst as a code owner October 12, 2025 11:08
@Fedik Fedik added the bug label Oct 12, 2025
@brianteeman
Copy link
Contributor

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

@Fedik
Copy link
Member Author

Fedik commented Oct 12, 2025

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.

@brianteeman
Copy link
Contributor

brianteeman commented Oct 12, 2025

Yes. I see the correct error page but not with the error-500 module

@Fedik
Copy link
Member Author

Fedik commented Oct 12, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants