No Code Attached Yet bug
avatar BrainforgeUK
BrainforgeUK
22 Sep 2022

Steps to reproduce the issue

(a) Install a plugin with a SQL form field in the XML config which relies on a table from a 3rd party component to already be installed. That component, and therefore the table, is missing.

(b) Install a plugin with a SQL error in a SQL form field in the XML config.

Expected result

Expect the error to be handle gracefully when entering the plugin config form.
i.e. table missing error message

Actual result

Get the error but when it is a large / complicated XML config it is muddled and confusing.

System information (as much as possible)

Joomla 4.2.2

Additional comments

In SqlField.php need to capture the mysqli_sql_exception using something like this (around line 270).

try {
// Set the query and get the result list.
$db->setQuery($this->query);
$items = $db->loadObjectList();
} catch (ExecutionFailureException $e) {
Factory::getApplication()->enqueueMessage(Text::
('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');
} catch (mysqli_sql_exception $e) {
Factory::getApplication()->enqueueMessage($e->getMessage(), 'error');
}
_

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar BrainforgeUK BrainforgeUK - open - 22 Sep 2022
avatar BrainforgeUK BrainforgeUK - change - 22 Sep 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 22 Sep 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 22 Sep 2022
avatar Hackwar Hackwar - change - 17 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 17 Feb 2023
avatar Hackwar Hackwar - change - 25 Aug 2023
Labels Added: PBF
avatar Hackwar Hackwar - labeled - 25 Aug 2023
avatar brianteeman brianteeman - change - 1 Sep 2023
Labels Removed: PBF
avatar brianteeman brianteeman - unlabeled - 1 Sep 2023

Add a Comment

Login with GitHub to post a comment