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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scor’s picture

Status: Active » Needs review
FileSize
969 bytes

This patch moves module_implements('', FALSE, TRUE); after the full bootstrap.

andypost’s picture

I 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

catch’s picture

We should move the registry table creation to update_prepare_d7_bootstrap() instead I think.

andypost’s picture

I 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.

catch’s picture

FileSize
3.42 KB

Moved the registry table creation.

scor’s picture

Status: Needs review » Reviewed & tested by the community

tested on two Drupal 6 site upgrades. it works. let's get below 100 criticals before the end of DrupalCon!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD! Yay!

Status: Fixed » Closed (fixed)
Issue tags: -D7 upgrade path

Automatically closed -- issue fixed for 2 weeks with no activity.