fix: license key warning no longer shows during uninstall
Universal: Auto Version Bump / Version Bump (push) Successful in 12s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 12s

Check if com_mokosuitecross is still in #__extensions before warning
about missing license key. Prevents the warning from firing during
package uninstall when the update site row is already deleted.
This commit is contained in:
Jonathan Miller
2026-06-23 11:44:55 -05:00
parent 2ee8a5e286
commit ac8a64c4c1
2 changed files with 14 additions and 0 deletions
+1
View File
@@ -31,6 +31,7 @@
- **Medium**: Fixed getUserId() returning array instead of string on error
- **Bluesky**: Replaced md5() with hash('sha256', ...) for cache key
- **ServiceController**: Exception details no longer exposed to client
- **License warning**: No longer shows during extension uninstall when component is being removed
## [01.04.01] --- 2026-06-21
@@ -117,6 +117,19 @@ class MokoSuiteCross extends CMSPlugin implements SubscriberInterface
try {
$db = Factory::getDbo();
// Don't warn if the component is not installed (e.g. during uninstall)
$componentExists = $db->setQuery(
$db->getQuery(true)
->select('COUNT(*)')
->from($db->quoteName('#__extensions'))
->where($db->quoteName('type') . ' = ' . $db->quote('component'))
->where($db->quoteName('element') . ' = ' . $db->quote('com_mokosuitecross'))
)->loadResult();
if (!$componentExists) {
return;
}
$query = $db->getQuery(true)
->select($db->quoteName('extra_query'))
->from($db->quoteName('#__update_sites'))