So after fiddling with the admin and front end of my module for awhile, turning it off and on, off and on I reached the point where I need to create a .install file for it and an install method.

I go about creating it, having it generate required content types for what my module does. The problem is the install() method never runs at all. I've disabled my module and re-enabled it numerous times and it just won't run?

Do I need to do this in an update() method since I've already enabled my module once or twice? Or is there some module cache which needs to be cleared in the db?

Thanks in advance!

st.

Comments

mradcliffe’s picture

Have you uninstalled your module completely or just disabled it?

You could try setting up a new development environment and testing it again.

Woggers’s picture

By completely do you mean having to remove it from the directory structure as well? I just disable it under the Modules admin area and then re-enable it? I thought that was as good as an uninstall?

Best,

st

Woggers’s picture

UPDATE: I tried completely removing it from the module directory structure as well and then redeploying it. Still won't run.

Best,

st

mradcliffe’s picture

No I mean clicking on the uninstall tab (on the modules' admin page) and toggling the uninstall option for your module.

Woggers’s picture

*BUMP*

Any ideas anyone????

heine’s picture

There are a number of options. Among them

  1. Implement hook_uninstall (an empty function will do) and uninstall the module (via tab on modules page)
  2. Execute the query "DELETE FROM system WHERE name = 'yourmodule_name';

--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.

Woggers’s picture

Thank you sir! This worked. Was not aware that I required an _uninstall hook as well to ensure that the install() runs when re-enabling.

Best,

Paul