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.
Trying to upgrade a basic vanilla 6.16 site fails with the following error:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'd7git.registry' doesn't exist: SELECT filename FROM {registry} WHERE name = :name AND type = :type; Array ( [:name] => DeleteQuery_mysql [:type] => class ) in _registry_check_code() (line 2449 of /Applications/MAMP/htdocs/d7git/includes/bootstrap.inc).
I believe this was introduced in #557542: Cache module_implements() , see in particular this comment: in update.php, module_implements() is called before DRUPAL_BOOTSTRAP_FULL and before update_fix_d7_requirements() which creates the registry table. Commenting module_implements('', FALSE, TRUE);
in update.php allows the upgrade to run.
Comment | File | Size | Author |
---|---|---|---|
#5 | update_registry.patch | 3.42 KB | catch |
#1 | 773720_1_upgrade_module_implements_cache.patch | 969 bytes | scor |
Comments
Comment #1
scor CreditAttribution: scor commentedThis patch moves
module_implements('', FALSE, TRUE);
after the full bootstrap.Comment #2
andypostI think this call is not needed at all if no $op is passed. OTOH this could kill custom language providers for drupal_language_initialize() but it seem it's not necessary for this piece of code
Comment #3
catchWe should move the registry table creation to update_prepare_d7_bootstrap() instead I think.
Comment #4
andypostI think we should wisely check this table for existence. Maybe in D8 or contrib to have some function to support migration from n-1 to n+1 release.
Comment #5
catchMoved the registry table creation.
Comment #6
scor CreditAttribution: scor commentedtested on two Drupal 6 site upgrades. it works. let's get below 100 criticals before the end of DrupalCon!
Comment #7
webchickCommitted to HEAD! Yay!