? Success

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
22 Jun 2017

At the moment if an error occurs we get just "An error has occurred" message and not anything helpful.

Today the error was "Out of sort memory, consider increasing server sort buffer size" which would have been a hell of a lot better output than just "An Error has occurred"

As this is the /administrator/ menu helper I dont see any reason why we should not display the exception message instead of a generic error message?

@mbabker
https://twitter.com/blueflameit/status/877887820286746624

avatar PhilETaylor PhilETaylor - open - 22 Jun 2017
avatar PhilETaylor PhilETaylor - change - 22 Jun 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Jun 2017
Category Modules Administration
avatar wilsonge
wilsonge - comment - 22 Jun 2017

Because in many cases this contains the database query that failed to execute which we don't want to expose to the user

avatar PhilETaylor
PhilETaylor - comment - 22 Jun 2017

we don't want to expose to the user

This is the admin console... I guess its not right to send the whole exception as it will not always be the super admin using the admin console, but equally its not right to just say an error happened, and not in what context (in this case, admin menu helper), because the generic message could have been raised, literally, anywhere and it takes someone like me to debug what the root issue was and where and in what context....

avatar mbabker
mbabker - comment - 22 Jun 2017

Because in many cases this contains the database query that failed to execute which we don't want to expose to the user

With the new database exceptions we aren't exposing the raw query anymore. At worst you're getting the database engine's error message.

avatar PhilETaylor
PhilETaylor - comment - 12 Nov 2018

Redundant PR as someone has already refactored this file while this PR was left open a year, and this is now a non issue as the new code is more helpful

JFactory::getApplication()->enqueueMessage(JText::sprintf('JERROR_LOADING_MENUS', $e->getMessage()), 'error');
avatar PhilETaylor PhilETaylor - change - 12 Nov 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-11-12 01:29:06
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 12 Nov 2018

Add a Comment

Login with GitHub to post a comment