I was having trouble upgrading my site from D6 to D7 (it has quite a few contributed modules) so I thought I'd give something a try based on this comment on the upgrade instructions (http://drupal.org/comment/reply/570162/5811038#comment-5811038).

I believe I was following the Drupal upgrade steps to the letter - here is what I was doing:

  1. Updated core and all contrib modules to latest version of 6
  2. Downloaded Drupal 7 and all v7 contrib modules as needed for the site to another folder
  3. Backed up files and database of my D6 site and logged in as user 1 to turn on maintenance mode
  4. Changed default theme to Garland
  5. Disabled all non-core modules
  6. Removed default.settings.php file
  7. Removed all core files and replaced them with the Drupal 7 core
  8. Step 9 on http://drupal.org/node/570162 states the following:
    Remove uninstalled modules
    If you uninstalled any modules, remove them from the sites/all/modules and other sites/*/modules directories. Leave other modules in place, even though they are incompatible with Drupal 7.x.

    So I did this - left all D6 contrib modules in place
  9. Made settings.php file writeable and ran update.php.

However, when I attempted the above (tried it twice) I got to the ugrade.php screen with the following messages:

Drupal database update

Error message
Notice: Undefined index: genesis_DTAv2 in _drupal_maintenance_theme() (line 74 of /Library/WebServer/Documents/drivetheamericas/includes/theme.maintenance.inc).
Notice: Trying to get property of non-object in _drupal_theme_initialize() (line 145 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Notice: Trying to get property of non-object in _theme_build_registry() (line 710 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Notice: Trying to get property of non-object in _theme_build_registry() (line 710 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Notice: Trying to get property of non-object in _theme_build_registry() (line 710 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Notice: Undefined index: genesis_DTAv2 in theme_get_setting() (line 1332 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Notice: Undefined index: genesis_DTAv2 in template_preprocess_maintenance_page() (line 2607 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Notice: Trying to get property of non-object in template_preprocess_maintenance_page() (line 2607 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Warning: array_keys() expects parameter 1 to be array, null given in template_preprocess_maintenance_page() (line 2610 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Warning: Invalid argument supplied for foreach() in template_preprocess_maintenance_page() (line 2610 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Use this utility to update your database whenever a new release of Drupal or a module is installed.

For more detailed information, see the upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider.

Back up your database. This process will change your database values and in case of emergency you may need to revert to a backup.
Back up your code. Hint: when backing up module code, do not leave that backup in the 'modules' or 'sites/*/modules' directories as this may confuse Drupal's auto-discovery mechanism.
Put your site into maintenance mode.
Install your new files in the appropriate location, as described in the handbook.
When you have performed the steps above, you may proceed.

Clicking the continue button on this screen just caused the page to refresh - I wasn't continuing anywhere. So I tried removing all of the contrib modules from sites/all/modules/contrib. This time when I ran through the upgrade process I got the the upgrade screen and was able to continue with the upgrade process.

I still had similar errors on the upgrade screen:

Error message
Notice: Undefined index: genesis_DTAv2 in _drupal_maintenance_theme() (line 74 of /Library/WebServer/Documents/drivetheamericas/includes/theme.maintenance.inc).
Notice: Trying to get property of non-object in _drupal_theme_initialize() (line 145 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Notice: Undefined index: genesis_DTAv2 in _drupal_maintenance_theme() (line 74 of /Library/WebServer/Documents/drivetheamericas/includes/theme.maintenance.inc).
Notice: Trying to get property of non-object in _drupal_theme_initialize() (line 145 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Notice: Trying to get property of non-object in _theme_build_registry() (line 710 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Notice: Trying to get property of non-object in _theme_build_registry() (line 710 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Notice: Trying to get property of non-object in _theme_build_registry() (line 710 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Notice: Undefined index: genesis_DTAv2 in theme_get_setting() (line 1332 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Notice: Undefined index: genesis_DTAv2 in template_preprocess_maintenance_page() (line 2607 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Notice: Trying to get property of non-object in template_preprocess_maintenance_page() (line 2607 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Warning: array_keys() expects parameter 1 to be array, null given in template_preprocess_maintenance_page() (line 2610 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Warning: Invalid argument supplied for foreach() in template_preprocess_maintenance_page() (line 2610 of /Library/WebServer/Documents/drivetheamericas/includes/theme.inc).
Use this utility to update your database whenever a new release of Drupal or a module is installed.

Despite these errors I figured what the heck might as well hit the continue button and see what happened. This time clicking the continue button allowed me to continue. It showed 144 pending updates, so I clicked the Update button. And got to the following message:

Updates were attempted. If you see no failures below, you may proceed happily back to your site. Otherwise, you may need to update your database manually. All errors have been logged.

Reminder: don't forget to set the $update_free_access value in your settings.php file back to FALSE.

Front page
Administration pages
The following updates returned messages

user module

Update #7000
User passwords rehashed to improve security
Update #7002
Migrated user time zones
Update #7014
Renamed the 'post comments without approval' permission to 'skip comment approval'.
Update #7017
The ability to send users their passwords in plain text has been removed in Drupal 7. Your existing email templates have been modified to remove it. You should review these templates to make sure they read properly.
system module
Update #7007
Inserted into {role_permission} the permissions for role ID 1, Inserted into {role_permission} the permissions for role ID 2, Inserted into {role_permission} the permissions for role ID 3, Inserted into {role_permission} the permissions for role ID 4
Update #7061
Upload module has been migrated to File module.

I clicked continue and now the site is running (without any contrib modules enabled) in D7. I don't necessarily consider this a successful upgrade since I haven't done any further work so it's hard to know how things are going to go once I start enabling contrib modules.

I hesitate to edit the content of upgrade instructions to tell people to remove their contrib modules before running the upgrade since I don't know if my experience is unique. Anyone experiencing something similar?

Comments

dswier’s picture

It is not necessary to remove all your Drupal 6 contrib modules before upgrading. Actually in your particular case it looks like your update errors were related to a custom maintenance theme, so most likely the issue could have been solved by making sure you were using the default maintenance theme.

kbrinner’s picture

I had tried the upgrade several times previous to this and saw that many of the errors appeared to be theme related. I did indeed disable my custom theme (a Genesis subtheme called genesis_DTAv2), set Garland as default, and then deleted both the Genesis theme and my subtheme. Without deleting Genesis and my subtheme genesis_DTAv2 I wasn't even making it to the Upgrade screen. When I deleted Genesis and the subtheme I would get to the upgrade screen, but clicking the continue button was just refreshing the page, it wasn't getting me to the screen where the updates are actually run. I'm not sure where those Notices that refer to my subtheme could be coming from once the themes were deleted, and I definitely didn't hack the core anywhere.

vm’s picture

was the maintenance theme set to be the subtheme in settings.php? on a default install the maintenance theme used would be a the subtheme that ships inside garland.

I'm not sure why removing default.settings.php was necessary. The settings.php has changed a great deal from D6 to D7 and I'd think that default.settings.php is required by the install. It is in D7.

kbrinner’s picture

I commented out maintenance_theme' => 'genesis_DTAv2', in the settings.php and all of the errors have disappeared (I was seeing the errors each time I added a module and ran update.php. So the errors were coming from this small issue I believe. If I do run through the upgrade again starting from D6, I'll be sure to do that before I run the upgrade. That said, I wasn't able to even do the upgrade (despite the errors) until I removed all of the D6 modules from the sites/all/modules folder.

Removing default.settings.php is step 7 on http://drupal.org/node/570162 - I believe the upgrade process takes the D6 settings.php and converts it as necessary for D7. Maybe because it's not an install but an upgrade, the default.settings.php file isn't needed...

vm’s picture

glad to hear the theme issue is squared away. Congrats.

kbrinner’s picture

I had to run through this upgrade again and can now confirm that you don't need to move the modules out of sites/all/modules to run the update without errors. When I had commented out the appropriate maintenance theme text in settings.php, the upgrade went without any problems.