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 5 Oct 2010 16:41:55 -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.513 diff -u -p -r1.513 system.install --- modules/system/system.install 5 Oct 2010 00:31:19 -0000 1.513 +++ modules/system/system.install 5 Oct 2010 16:41:56 -0000 @@ -2854,6 +2854,17 @@ function system_update_7062() { } /** + * Delete {menu_links} records where type = MENU_CALLBACK to match the status of newly created links. + */ +function system_update_7063() { + menu_rebuild(); + $result = db_query('SELECT ml.mlid FROM {menu_links} ml INNER JOIN {menu_router} mr ON ml.router_path = mr.path WHERE ml.customized = 0 AND mr.type = :callback', array(':callback' => 0)); + 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. */