← Back to team overview

mahara-contributors team mailing list archive

[Bug 505732] Re: Plugins cannot be uninstalled

 

I think we have to give site admins the power to shoot themselves in the
foot if they want to. The uninstall *should* delete all the content from
the database (maybe you're removing it to try to reduce the size of your
database), dataroot, everything.

The easiest thing to do, is to go through install.xml and delete all the
tables generated for the plugin. We would also need to go through all
the tables for that plugin type (such as {plugin}_cron, etc) and delete
content from those.

On top of that, each plugin will need to have a "post_uninstall()"
optional method (and maybe a "pre_uninstall()" as well) for custom de-
installation code.

The trickiest part of this, would be dealing with serialized block data,
which occasionally contains references to other plugin types. That's the
kind of thing the post_uninstall() method would have to deal with.

I also think, for the sake of our sanity, it might be best to prevent
the core plugins from being uninstalled. They have been written with the
assumption of permanence since day 1 and there are many hacky references
to their existence scattered throughout the codebase (like the code that
adds unique message thread ids to interaction/forum emails). So there's
probably a lot of potential for crashes if you delete core plugins.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/505732

Title:
  Plugins cannot be uninstalled

Status in Mahara ePortfolio:
  In Progress

Bug description:
  Plugins cannot be completely removed from Mahara. They can only be
  enabled/disabled via the Administer Extensions page. A plugin could
  presumably be removed completely with some SQL hacking, but a feature
  should be added that does this when needed.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/505732/+subscriptions