Closed (won't fix)
Project:
Color.module: SoC 2008
Version:
6.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Oct 2008 at 20:40 UTC
Updated:
18 Oct 2010 at 13:25 UTC
The install instructions are really odd.
3. Copy the new color.module in /color. Disable color.module. Now click the "Uninstall" tab and fully uninstall color.module. Re-enable. This will insure the installer is hooked and that the tables are properly created.
The grammar is attrocious, but I'm reading it as…
But when "uninstall" I get these errors:
- user warning: Unknown table 'color' query: DROP TABLE color in includes/database.mysql-common.inc on line 261.
- user warning: Unknown table 'color_schemes' query: DROP TABLE color_schemes in includes/database.mysql-common.inc on line 261.
- warning: Invalid argument supplied for foreach() in sites/all/modules/color_soc08/color.install on line 57.
So it looks like you don’t need to uninstall the old color module.
What was the original rationale for having this uninstall step in there? That step seems completely unnecessary.
Comments
Comment #1
johnalbinCorrection:
Comment #2
tonyn commentedGotcha.
Updating that, because it's just giving people errors.
Thanks!
Comment #3
tonyn commentedOops. One moment.
We uninstall it because we need to use the hook_install to make the new tables. Hook_install() does the schema editions.
Will enabling/disabling like this still do the hook_install()? In for disabling/enabling, we don't want to fully uninstall.
What would could do with hook_enable is check to see if the schema is existing and correct, perhaps?
Comment #4
johnalbinActually, rather then messing with hook_enable and checking the schema, we should be using hook_update_N(). Then users would just need to install, enable and run /update.php.
I have a really simple patch sitting on my computer that adds that function, but the #324502: Code cleanup patch touches too many lines to not conflict with this patch, so I'll post this patch later.
Once hook_update_N is added to color.install: If a user has never used or enabled the original color module, the code in color_install will install the db schema and Drupal will set the internal revision of color module to the highest N numbered hook_update_N function. If a user has already enabled the original color module, Drupal won't run color_install(), but instead the user will need to run /update.php so that the hook_update_N function is run and that function will install the db schema.
Comment #5
tonyn commentedI'm applying that patch now, so we can get working with that codebase.
Also, I pondering changing the installation instructions to:
Comment #6
mdupontAny news on this?
Comment #7
mdupontSeems like this module is deprecated and won't longer be developed.