Index: modules/simpletest/tests/upgrade/upgrade.test =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/tests/upgrade/upgrade.test,v retrieving revision 1.8 diff -u -p -r1.8 upgrade.test --- modules/simpletest/tests/upgrade/upgrade.test 1 Oct 2010 18:37:22 -0000 1.8 +++ modules/simpletest/tests/upgrade/upgrade.test 8 Oct 2010 06:21:25 -0000 @@ -381,5 +381,9 @@ class BasicUpgradePath extends UpgradePa $this->assertText(t('Reports')); $this->assertText(t('Structure')); $this->assertText(t('Modules')); + + // Confirm that no {menu_links} entry exists for user/autocomplete. + $result = db_query('SELECT COUNT(*) FROM {menu_links} WHERE link_path = :user_autocomplete', array(':user_autocomplete' => 'user/autocomplete'))->fetchField(); + $this->assertFalse($result, t('No {menu_links} entry exists for user/autocomplete')); } } Index: modules/system/system.install =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.install,v retrieving revision 1.515 diff -u -p -r1.515 system.install --- modules/system/system.install 6 Oct 2010 13:38:40 -0000 1.515 +++ modules/system/system.install 8 Oct 2010 06:21:25 -0000 @@ -2851,6 +2851,19 @@ function system_update_7062() { } /** + * Delete {menu_links} records for 'type' => MENU_CALLBACK which would not appear in a fresh install. + */ +function system_update_7063() { + // For router items where 'type' => MENU_CALLBACK, {menu_router}.type is + // stored as 4 in Drupal 6, and 0 in Drupal 7. Fortunately Drupal 7 doesn't + // store any types as 4, so delete both. + $result = db_query('SELECT ml.mlid FROM {menu_links} ml INNER JOIN {menu_router} mr ON ml.router_path = mr.path WHERE ml.module = :system AND ml.customized = 0 AND mr.type IN(:callbacks)', array(':callbacks' => array(0, 4), ':system' => 'system')); + foreach ($result as $record) { + db_delete('menu_links')->condition('mlid', $record->mlid)->execute(); + } +} + +/** * @} End of "defgroup updates-6.x-to-7.x" * The next series of updates should start at 8000. */