diff --git a/source/script.php b/source/script.php index 24dc48d5..25ca982a 100644 --- a/source/script.php +++ b/source/script.php @@ -464,6 +464,16 @@ class Pkg_MokosuiteclientInstallerScript { try { + // Only enable if the plugin files actually exist on disk + $pluginDir = JPATH_PLUGINS . '/' . $group . '/' . $element; + + if (!is_dir($pluginDir)) + { + Log::add('Skipping enable for ' . $group . '/' . $element . ' — files not installed', Log::DEBUG, 'mokosuiteclient'); + + return; + } + $db = Factory::getDbo(); $query = $db->getQuery(true) ->update($db->quoteName('#__extensions'))