Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-85335

cannot uninstall subplugin if missing code for main plugin

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.4.9, 4.5.5, 5.1, 6.0
    • Administration

      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/

      •   Uninstall the plugin: 

      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

            guillaumeb87 Guillaume BARAT
            guillaumeb87 Guillaume BARAT
            Brendan Heywood Brendan Heywood
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.