mohankumargupta / mentionsdrupal8module

Unofficial Drupal 8 port of mentions module
6 stars 5 forks source link

Issue when uninstalling the module #1

Open janellecmi opened 7 years ago

janellecmi commented 7 years ago

The module isn't removing its filters from text formats properly when uninstalled. The uninstallation fails with:

Provides a filter plugin that is in use in the following filter formats: <em class="placeholder">Basic HTML, Full HTML</em>' in
../core/lib/Drupal/Core/Extension/ModuleInstaller.php:354
Stack trace:
#0 ../core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(91):
Drupal\Core\Extension\ModuleInstaller->uninstall(Array, true)
#1 ../drush/commands/core/drupal/environment.inc(227): Drupal\Core\ProxyClass\Extension\ModuleInstaller->uninstall(Array)
#2 ../drush/commands/core/drupal/pm_8.inc(82): drush_module_uninstall(Array)
#3 ../drush/commands/pm/pm.drush.inc(1237): _drush_pm_uninstall(Array)
#4 [internal function]: drush_pm_uninstall('mentions')
#5 ../drush/includes/command.inc(373): call_user_func_array('drush_pm_uninst...', Array)
#6 ../drush/includes/command.inc(224): _drush_invoke_hooks(Array, Array)
#7 [internal function]: drush_command('mentions')
#8 ../drush/includes/command.inc(192): call_user_func_array('drush_command', Array)
#9 ../drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#10 ../drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#11 ../drush/drush.php(12): drush_main()
#12 {main}

Removing the mention filter from each of the text formats manually allows the module to uninstall properly.

mohankumargupta commented 7 years ago

Thanks for filing this issue.

Get the same error uninstalling with the GUI "The following reason prevents Mentions from being uninstalled: Provides a filter plugin that is in use in the following filter formats: Basic HTML, Full HTML"

Not being a Drupal 8 expert, the only way around it I can see at present is if I provide my own uninstall form for this module. I don't see any way my module can signal to Drupal core "Hey drupal core, let me handle that gracefully".

The module is currently missing a settings page on the Configuration tab. Might be a good place to link to the uninstall form. Unsure how to proceed, might need to sleep on it.

Thanks Mohan