When using the cli script uninstall_plugins.php We cannot remove any subplugins if the main plugins code has been removed before.
Steps to replicate:
- Install any plugin containing subplugins ex: https://github.com/catalyst/moodle-local_datacleaner / git submodule add -b MOODLE_311_STABLE git@github.com:catalyst/moodle-local_datacleaner.git local/datacleaner
- Add any setting on one of the subplugins ex: admin/settings.php?section=cleaner_email
- Remove the plugin from the code source ex:
rm -rf local/datacleaner/
|
rm -rf .git/modules/local/datacleaner/
|
git rm --cached local/datacleaner/
|
php admin/cli/uninstall_plugins.php --plugins=local_datacleaner --run
|
- Verify that the subplugin still exist in the config table:
SELECT * FROM mdl_config_plugins WHERE plugin = 'cleaner_email';
|
- Uninstall the subplugin "cleaner_email":
php admin/cli/uninstall_plugins.php --plugins=cleaner_email --run
|
- Notice the error message:
Can not be uninstalled: email
|