While using an install profile to install jquery_update (code sample below), the Drupal installer outputs the following error:
Warning: Table 'system' doesn't exist query: SELECT filename FROM system WHERE name = 'jquery_update' AND type = 'module' in /includes/database.mysqli.inc on line 156
This occurs because inside the jquery_update_requirements function, the "install" case has no stopping point and runs right into "runtime" - Since in an installation profile, you can't perform all runtime functions, it provides the Warning above.
I have attached a patch to fix this issue (essentially adding a break in the correct place).
Code that causes the issue:
function millennium_profile_modules(){
return array(
'block',
'color',
'comment',
'filter',
'help',
'menu',
'node',
'system',
'taxonomy',
'user',
'watchdog',
'path',
'jquery_update',
//Contrib: CCK
'content', 'fieldgroup', 'nodereference', 'number', 'text', 'optionwidgets', 'filefield', 'imagefield', 'imageapi', 'views',
//Contrib: Other
'token', 'pathauto', 'date_api', 'date', 'workflow_ng', 'calendar',
);
}
Thank you for this review.
Comment | File | Size | Author |
---|---|---|---|
#1 | 325316_fix_requirement_check.patch | 599 bytes | alex_b |
jquery_update.patch | 484 bytes | webkenny | |
Comments
Comment #1
alex_b CreditAttribution: alex_b commentedThe problem occurs when drupal_get_path() runs a DB query on system and the system table is not there yet.
The patch above removes the checks on $phase == 'install' altogether, but I would suggest to just replace drupal_get_path() with dirname(). See attached patch.
Works for me. @webkenny: does this work for you?
Comment #2
heddnMarking this as won't fixed. 5.x is no longer supported/maintained. If this is still an issue in 7.x, then please re-open.