Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When the _install hook is invoked in devel_reinstall_submit(), the relevant module's .install file is not loaded.
Patch attached that adds module_load_install()
Comment | File | Size | Author |
---|---|---|---|
#3 | devel_reinstall_1.patch | 1.96 KB | anders.fajerson |
#2 | devel_reinstall_0.patch | 1.98 KB | anders.fajerson |
#1 | devel_reinstall.patch | 887 bytes | anders.fajerson |
reinstall_load_install.patch | 742 bytes | asimmonds | |
Comments
Comment #1
anders.fajerson CreditAttribution: anders.fajerson commentedTested and works as expected. If a module tries to create tables that already exist there will be an error message, which shouldn't be a big problem.
I've added
module_invoke($module, 'uninstall');
which fixes that problem if the module are doing the right thing and uninstalling its tables.This patch is for 5.x
Comment #2
anders.fajerson CreditAttribution: anders.fajerson commentedUpdated the text to follow the new behavior. Not really sure about this but here is my take:
Comment #3
anders.fajerson CreditAttribution: anders.fajerson commentedAdded missing colons to the last hook_uninstall in the text.
Comment #4
moshe weitzman@drupal.org CreditAttribution: moshe weitzman@drupal.org commentedlooks sane to me. would be nice to get another opinion, ideally from drumm who authored this feature.
Comment #5
moshe weitzman@drupal.org CreditAttribution: moshe weitzman@drupal.org commentedthe reinstall page with its column of buttons is pretty ugly. i'd enjoy ideas or a patch which improves this.
Comment #6
Stefan Nagtegaal CreditAttribution: Stefan Nagtegaal commentedI think it's better to have a 2 column table, with checkboxes in the first column, and the module names in the second column.
The one subm it button that says 'Reinstall selected modules', and that would work fine. And is more consistent with the rest of drupal atm...
Stefan
Comment #7
moshe weitzman@drupal.org CreditAttribution: moshe weitzman@drupal.org commentedcommitted. thx.
Comment #8
(not verified) CreditAttribution: commented