This has happened to me a couple of times while testing modules:
You disable the module, erase the files and decide to drop the tables created by the module and empty the cache in order to do a clean reinstall of the module.
Only that this time, the module .install file is not executed.
Usually this is not much problem, since you can go in and copy/paste the MySQL code yourself.
But it's inconvenient, and in some modules the .install code is not that clear with conditional statements that check for upgrades, etc.
Is there a table that keeps track of installed modules and prevents the .install file from being ran?
I did find a couple of module related entries on the system table, another one on the sequence table and some in the variable table.
In this case, I was trying to debug some errors with the buddylist module in 4.7. I uninstalled it, dropped the database tables, erased the module, emptied the cache and remove all entries I found from the system, sequence and variable tables.
But when I try to reinstall the module, the .install file code is not executed.
Where should I look for to reset this flag?
Thanks.
Comments
yeah
I would really like to see an answer to this question as well.
Agreed
Me too. Been having issues with TinyMCE for 4.7, evenyone else seem to have it working fine... my .install doesn't run.
Yes
Yes, same here. (sorry for trolling, but I want to track when the real answer does come)
have a look in the system table
Drupal stores some info about themes/modules/theme engines in a table named
system
. So basically what you need to do in order to make Drupal forget your module is this:DELETE FROM system WHERE name = 'name_of_your_module' AND type = 'module'
system table, name of module.
So if the name of the module in question isn't in the system table, it's safe to assume the .install isn't even inserting to the DB, correct?
Deleting all 40 ecommerce module signatures in the system table
To delete them all, I've run the following query (Drupal 5):
Amnon
-
Drupal Focused Search Engine | Drupal Israel
Personal: Hitech Dolphin: Regain Simple Joy :)
one more row in system table
don't forget this one:
, Fedex shipping API for E-Commerce."
Thanks
Thank you very much. It worked for me.
The answer is here...
My bad, I went ahead and posted a question without properly researching the issue.
The answer is here:
http://drupal.org/node/51220
Basically, yes, you have to go to the system table in your MySQL database and remove the record for the module you want to reinstall. For some reason I wasn't finding that record in my case (must likely I was doing a search for "like buddy" and not "contains buddy". When I did search againg for buddylist, I found it, removed it and reinstalling did execute the .install file this time.
I apologize. Although, it seems this will help others get an answer to the same question.
Regards.
------
Con paciencia y calma,
sube un burro a una palma
Might be good to summarize
Might be good to summarize and add an item with a link to the Troubleshooting FAQ
http://drupal.org/node/199
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Devel module
A reinstall module funtion is available in the devel module block.
Thank you, whereisian, for
Thank you, whereisian, for that info! It is very helpful!!
Instead of editing the system table directly...
you can also add an uninstall hook with at least one command in your mymodule.install file, such as:
Disable your module and then go to the uninstall tab at admin/build/modules/uninstall and your module should now show up there.
Use devel module
See related post here