(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.
Expect the error to be handle gracefully when entering the plugin config form.
i.e. table missing error message
Get the error but when it is a large / complicated XML config it is muddled and confusing.
Joomla 4.2.2
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');
}
_
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
bug
|
Labels |
Added:
PBF
|
Labels |
Removed:
PBF
|