0

I prepared a module that has some issues. I tried to install it, but while installing it crashed. I'd like to make some tiny changes and reinstall it, but the module is set as installed. When I go to uninstall this page is no longer available, because while module was installing it provided some changes, so uninstall page crashes. I know how to uninstall a broken module, but this procedure is pure evil and it takes a wile. Is there, so the changes are rolled back if the module has some issues?

3
  • Possible duplicate of Manually disable a module Apr 8 '17 at 8:13
  • valli's suggestion to edit the config table works form me. Better would be to have a database backup to which you can revert. Apr 8 '17 at 8:15
  • Not only config table but there's a key_value table that needs to be investigated to uninstall module. There might be more tables to remove, but these two are the most important. Still, it takes quite some time to clear those.
    – David
    Apr 10 '17 at 6:55
1

Before the module installation you export your site configuration with drush cex. You install your module and if it crash you import the saved configuration with drush cim.

1
  • makes sense, I've also found that devel module has option to reinstall module and it can handle with errors. It's a really fast process, probably there's a drush or drupal console command to reinstall module using devel.
    – David
    Apr 10 '17 at 6:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.