There needs to be a big warning somewhere (preferably at least the project page) that tells people that the module name has changed and that the old one needs to be disabled and uninstalled before installing this one. Otherwise, the old code remains and Drupal doesn't see the new version. It would be even nicer if this code be automated in an update_N function.

Comments

behindthepage’s picture

Assigned: Unassigned » behindthepage

Thanks Nancy. I have added a warning to the project page and the readme.txt.
I will check out the update function.

nancydru’s picture

Thanks. If I get a chance, I'll look at how to do something like this too.

behindthepage’s picture

It looks like hook_update_N only does changes to the database
http://api.drupal.org/api/function/hook_update_N/5

I could put a contact_lists.info file in the folder that was blank. I think that would kill the old version. A bit bodgy though.

nancydru’s picture

It can do just about anything that only needs to be done once.

behindthepage’s picture

I have added some code to the install file and the module to do the following.
1. When Contact Forms is enabled it disables Contact List.
2. If both modules are installed a message shows on admin/build/contact/settings with instructions to delete the contact list files until they are.
3. If Contact Forms is enabled and then Contact Lists is enabled, Contact Lists will be automatically disabled.

Check out version 5.x- 1.4

gpdinoz

nancydru’s picture

Sounds good. I'll take a look.

behindthepage’s picture

Project: » Contact Forms
Version: » 5.x-1.7
Status: Active » Closed (fixed)

Transfered from Contact List