From a new Drupal 6.17 install, upgrading to Drupal 7 CVS fails with:


* Notice: Undefined property: stdClass::$uri in system_update_files_database() (line 2173 of C:\wamp\www\drupal\modules\system\system.module).
* Notice: Undefined property: stdClass::$name in system_update_files_database() (line 2174 of C:\wamp\www\drupal\modules\system\system.module).
* PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'filename' cannot be null: INSERT INTO {system} (filename, name, type, owner, info) ...
[:db_insert_placeholder_65] =>
[:db_insert_placeholder_66] =>
[:db_insert_placeholder_67] => module
[:db_insert_placeholder_68] =>
[:db_insert_placeholder_69] => a:1:{s:8:"required";b:1;}

It looks like the row that is malformed is the $module['default'] install profile entry generated in _system_rebuild_module_data(), and it looks like the corruption is happening in the callback to hook_system_info_alter().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jromine’s picture

Component: update system » system.module

On further study, in modules/system/system.module:_system_rebuild_module_data(), a $modules[] entry is set for the current install profile (for Drupal 6.17, named 'default'). Since the 'default' install profile is not present in Drupal 7, this array entry is unset at around line 2258 of system.module:

    // Skip modules that don't provide info.
    if (empty($module->info)) {
      unset($modules[$key]);
      continue;
    }

However the code at around line 2272:

  // The install profile is required.
  $modules[$profile]->info['required'] = TRUE;

causes a new entry in $modules to be created with only an 'info' property.

I'm not sure what the correct fix is.

Jarek Foksa’s picture

Priority: Normal » Critical
FileSize
151.34 KB
48.42 KB

I'm also getting those errors when trying to upgrade from Drupal 6.17 to current dev snapshot (June 13).

Marking as critical since it's clearly breaking the upgrade path.

grendzy’s picture

Issue tags: +D7 upgrade path
grendzy’s picture

Status: Active » Needs review
FileSize
581 bytes

Seems to me if the profile doesn't exist (could be default.profile, or a custom profile from prior versions) then it can just be skipped.

catch’s picture

Status: Needs review » Reviewed & tested by the community

Works for me.

Jarek Foksa’s picture

#4 fixes the problem for me.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

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

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