[support] Upgrading from Drupal 6 to Drupal 7

Earnie Boyd earnie at users.sourceforge.net
Thu May 10 18:11:59 UTC 2012


I have noticed on a few occasions that when upgrading from Drupal 6 to
Drupal 7 when running update.php things seem to go alright with the
first update.php.  However, if you execute update.php again you'll
have update items that did not complete and will not complete until
you fix the code.  In particular there are some db_insert() queries
that will fail due to duplicate entries for the data being inserted.
I have found these in both modules/system/system.install and
modules/block/block.install.  The simplest resolution to these is to
modify those files and wrap the insert with a try {} catch() {} block
similar to shown in the api documentation[1] except when you catch the
event you need to continue on.

[1] http://api.drupal.org/api/drupal/includes%21database%21database.inc/group/database/7

-- 
Earnie
-- https://sites.google.com/site/earnieboyd


More information about the support mailing list