No Code Attached Yet
avatar PhilETaylor
PhilETaylor
24 Aug 2021

Steps to reproduce the issue

Probably a note to self.

Cause a fatal PHP error in admin when debug = true

Expected result

Red type Symfony stack trace, with the multiple exceptions or errors shown

Screenshot 2021-08-24 at 21 18 44

Actual result

Joomla error page showing only the latest stack trace

Screenshot 2021-08-24 at 23 56 36

System information (as much as possible)

Additional comments

avatar PhilETaylor PhilETaylor - open - 24 Aug 2021
avatar joomla-cms-bot joomla-cms-bot - change - 24 Aug 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 24 Aug 2021
avatar Fedik
Fedik - comment - 25 Aug 2021

That is expected. All exceptions from Application handled by Joomla Exception handler.
Symfony ErrorHandler used for boot process, and when Joomla Exception handler failed (then you will get 2 exceptions in a list, as on your screen).

avatar PhilETaylor
PhilETaylor - comment - 25 Aug 2021

With debug mode enabled, It would be much better to show the Symfony error handler which has more features including click to launch code in IDE support (PR Coming soon).

With debug mode disabled, we can leave the Joomla Exception Handler to display the error (as it does now, without a stack trace)

avatar Fedik
Fedik - comment - 25 Aug 2021

That need to discuss, what other want/like. I am fine with both approach.

Btw, symfony error handler "full report" also work when error_reaporting => maximum, not required debug => true (that may be overhead in some cases)

avatar PhilETaylor
PhilETaylor - comment - 25 Aug 2021

error_reporting is more about hiding and showing PHP errors and should (and does) only map to the PHP ini setting error_reporting

error_reporting was a quick way to hide PHP warnings in older versions of Mambo/Joomla

It makes no sense to have error_reporting on and debug mode off.

Debug mode however should show stack traces and helpful debug information - and IMHO - should also enable by default, when debug is enabled, error_reporting(E_ALL) and display_errors = On.

avatar wilsonge
wilsonge - comment - 25 Aug 2021

With debug mode enabled, It would be much better to show the Symfony error handler

Joomla's exception handler is aware of request format - it can handle appropriately for JSON, JSON API, XML etc - symfony's only deals with cli/html.

Joomla's HTML renderer could definitely be enhanced or pass it through to Symfony - but I don't think we want to completely shortcut it out. It's also still at the stage where because we set the response body into the application we can have plugin events trigger on render of the error page (Symfony's one was put higher level when we didn't have that level of information available).

avatar PhilETaylor PhilETaylor - change - 25 Aug 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-08-25 12:16:58
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 25 Aug 2021
avatar PhilETaylor
PhilETaylor - comment - 25 Aug 2021

ok cool

avatar wilsonge
wilsonge - comment - 25 Aug 2021

Just to be clear we can improve things to be sure. Just completely removing the Joomla Exception handler isn't the right approach but there's definitely scope to improve things.

avatar PhilETaylor
PhilETaylor - comment - 25 Aug 2021

No worries... first I have to completely rewrite the LDAP plugin... for the 5 people in the world using it :)

Add a Comment

Login with GitHub to post a comment