Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
ctools_update_6003 and ctools_update_6007 call drupal_install_modules which is not in Drupal 7, they should call module_enable which in Drupal 7 now includes the $enable_dependencies option.
/**
* Take over for the panels_views module if it was on.
*/
function ctools_update_6003() {
$result = db_query('SELECT status FROM {system} WHERE name = :name', array(':name' => 'panels_views'))->fetchField();
if ($result) {
db_delete('system')->condition('name', 'panels_views')->execute();
drupal_install_modules(array('views_content'));
}
}
should be
/**
* Take over for the panels_views module if it was on.
*/
function ctools_update_6003() {
$result = db_query('SELECT status FROM {system} WHERE name = :name', array(':name' => 'panels_views'))->fetchField();
if ($result) {
db_delete('system')->condition('name', 'panels_views')->execute();
module_enable(array('views_content'), TRUE);
}
}
and
/**
* ctools_custom_content table was originally here, but is now moved to
* its own module.
*/
function ctools_update_6007() {
$ret = array();
if (db_table_exists('ctools_custom_content')) {
// Enable the module to make everything as seamless as possible.
drupal_install_modules(array('ctools_custom_content'));
}
return $ret;
}
should be
/**
* ctools_custom_content table was originally here, but is now moved to
* its own module.
*/
function ctools_update_6007() {
$ret = array();
if (db_table_exists('ctools_custom_content')) {
// Enable the module to make everything as seamless as possible.
module_enable(array('ctools_custom_content'), TRUE);
}
return $ret;
}
Comment | File | Size | Author |
---|---|---|---|
#1 | ctools.install_calls_drupal_install_modules_should_call_module_enable-1245348-0.patch | 838 bytes | kanani |
Comments
Comment #1
kanani CreditAttribution: kanani commentedPatch attached
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commentedSeems reasonable. Committed.