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.
By chx on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Description:
If you were running any queries against the {system} table, these won't work any more. For example:
Drupal 7:
// Enable the admin theme.
db_update('system')
->fields(array('status' => 1))
->condition('type', 'theme')
->condition('name', 'seven')
->execute();
Drupal 8:
theme_enable(array('seven'));
Setting module weights:
Drupal 7:
// Set a module's weight.
db_update('system')
->fields(array('weight' => $weight))
->condition('name', $mymodule)
->execute();
Drupal 8:
module_set_weight($mymodule, $weight);
To set a module's weight relative to another, a module_get_weight
function is planned.
Impacts:
Module developers
Comments
Patch provided to fix {system} table issue in Code Review module
I have created a patch for Coder Review module #1816302: Code Review 7.x-1.2 to 8.x-1.x Patch so that anybody can use it to do the code review in D8.
Actually I needed this to do one of the task mentioned here - #1518116: [meta] Make Core pass Coder Review. This might be useful to others as well.