Posted by NoRandom on November 10, 2009 at 6:08pm
Jump to:
| Project: | Custom filter |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
During upgrading from beta 11 you get this error:
user warning: Table 'customfilter_filter' already exists query: ALTER TABLE customfilter_filters RENAME TO customfilter_filter in /home/mysite/www/includes/database.mysql-common.inc on line 249.
I had a working installation of beta 11 with different custom filters defined.
Regards.
Comments
#1
Sorry for double posting, I forgot to add the full error report:
The following queries were executed
customfilter module
Update #6111
* ALTER TABLE {customfilter_rules} DROP INDEX weight
* ALTER TABLE {customfilter_rules} ADD INDEX customfilter_rule_fid (fid)
* ALTER TABLE {customfilter_rules} ADD INDEX customfilter_rule_weight (weight)
* Failed: ALTER TABLE {customfilter_filters} RENAME TO {customfilter_filter}
* ALTER TABLE {customfilter_rules} RENAME TO {customfilter_rule}
...and after the failed upgrade you get this watchdog error:
user warning: Table 'mydb.custom_filter' doesn't exist query: SELECT * FROM custom_filter ORDER BY name in /home/mysite/www/sites/all/modules/customfilter/customfilter.module on line 358.#2
...update to "critical" since custom filter stop working.
Regards, thanks in advance and sorry for the triple posting.
UPDATE:
It seems the problem comes from my upgrade from drupal 5 to 6:
Drupal 5: customfilter_filter table
Drupal 6: customfilter_filters table (notice the ending S), so I lost all my filters. I thought it was caused by the drupal core upgrade. So I started from scratch all my filters.
Custom filter upgrade 1.0 beta 11 to beta 12: The module tryes to correct the error with the table name but the old one still exists.
#3
The Drupal 6 branch always used the table name custom_filters. As most of the Drupal core tables are named using the singular (or they are renamed in such way in Drupal 7), I renamed the module tables as well, but I didn't notice the Drupal 5 branch used the name.
I will fix the problem with the update function.
#4
The code has been changed, and committed in CVS.
To resolve the problem you need to manually delete the table custom_filter, and rename custom_filters as custom_filter.
Thanks for your help in finding an upgrade problem.
#5
Automatically closed -- issue fixed for 2 weeks with no activity.