No Code Attached Yet bug
avatar BrainforgeUK
BrainforgeUK
1 Dec 2021

Steps to reproduce the issue

Create a SqlField form item with an error - e.g mistype column name

Expected result

Sensible error message

Actual result

Vague 'An error has occurred.' error message

System information (as much as possible)

Additional comments

Changing SqlField.php line 293 to include something like this would help:

'
try
{
$items = $db->loadObjectList();
}
catch (ExecutionFailureException $e)
{
Factory::getApplication()->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');
Factory::getApplication()->enqueueMessage($e->getMessage(), 'error');
Factory::getApplication()->enqueueMessage($this->query->__toString(), 'error');
}'

avatar BrainforgeUK BrainforgeUK - open - 1 Dec 2021
avatar BrainforgeUK BrainforgeUK - change - 1 Dec 2021
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 1 Dec 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Dec 2021
avatar zero-24
zero-24 - comment - 1 Dec 2021

If anything a publication of the SQL query should be behind a JDEBUG check. It was an intention to not display information that are in the most cases not usefull to the people seeing it. The best case would be to put it into an log file and not into the public site.

avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 22 Feb 2023
avatar brianteeman brianteeman - change - 31 Aug 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-08-31 08:25:52
Closed_By brianteeman
avatar brianteeman brianteeman - close - 31 Aug 2023
avatar brianteeman
brianteeman - comment - 31 Aug 2023

Closing as intended behaviour

Add a Comment

Login with GitHub to post a comment