When saving changes I was getting a warning message from admin.inc:
* user warning: Table 'my_drupal.system' doesn't exist query: SELECT name, info FROM system WHERE status = 1 AND type = 'module' AND info NOT LIKE '%s:7:\"package\";s:15:\"Core - %' in /Path-To-My-Site/drupal/sites/all/modules/ie_css_optimizer/ie_css_optimizer.admin.inc on line 32.
* user warning: Table 'my_drupal.system' doesn't exist query: SELECT name, info FROM system WHERE status = 1 AND type = 'module' AND info NOT LIKE '%s:7:\"package\";s:15:\"Core - %' in /Path-To-My-Site/drupal/sites/all/modules/ie_css_optimizer/ie_css_optimizer.admin.inc on line 32.
That bit of code was hardcoded to select from the "system" table but should have been tweaked to also check for any table prefixes ... I made a two character change per the following link to enclose the system table with curly brackets (system =>{system}) and it seems to work fine now: http://api.drupal.org/api/function/db_prefix_tables/6
$ diff -uarN ie_css_optimizer-orig/ie_css_optimizer.admin.inc ie_css_optimizer/ie_css_optimizer.admin.inc
--- ie_css_optimizer-orig/ie_css_optimizer.admin.inc 2010-08-15 09:34:54.000000000 +0000
+++ ie_css_optimizer/ie_css_optimizer.admin.inc 2010-08-15 09:36:16.000000000 +0000
@@ -29,7 +29,7 @@
// Create a list of non-core modules.
$modules = array();
- $contrib_modules = db_query("SELECT name, info FROM system WHERE status = 1 AND type = 'module' AND info NOT LIKE '%%%s%%'", 's:7:"package";s:15:"Core - ');
+ $contrib_modules = db_query("SELECT name, info FROM {system} WHERE status = 1 AND type = 'module' AND info NOT LIKE '%%%s%%'", 's:7:"package";s:15:"Core - ');
while ($module = db_fetch_array($contrib_modules)) {
$module['info'] = unserialize($module['info']);
$package = isset($module['info']['package']) ? $module['info']['package'] : 'Other';
| Comment | File | Size | Author |
|---|---|---|---|
| 8.15.2010-ie_css_optimizer-db_prefix.patch | 778 bytes | eggersrj |
Comments
Comment #1
lucascaro commentedsubscribing :)
Comment #2
kari.kaariainen commentedWorks for me.
Comment #3
ryanilg commentedI am getting this error as well. Looks like its not taking the table prefix into account.
I am assuming Kari is not using one, and that is why they are not getting the error.
Comment #4
kari.kaariainen commentedI meant that the patch works for me. I'm using prefixes and had to use the patch, ie. add the brackets.
Comment #5
johnalbinThanks, Robert! You're in the CHANGELOG now.
Fixed.