Drupal installation profile: menu_link_save() doesn't work for "import" path In my installation profile, I am trying to add a menu link for the /import path (from feed_import module). menu_link_save() works for all my menu paths with the exception of /import. Anyone have ideas why?

So, this works and creates a menu path to /user:

$link = array('menu_name' =&gt; 'menu-authenticated', 'link_path' =&gt; 'user', 'link_title' =&gt; 'Account');
menu_link_save($link);


But this does not:

$link = array('menu_name' =&gt; 'menu-authenticated', 'link_path' =&gt; 'import', 'link_title' =&gt; 'Import');
menu_link_save($link);


After installation is finished, /import path works (feeds_import is installed and enabled in the installation profile), but the menu link was not created.

Any help would be much appreciated. Thanks!
As tvl advised, "import" path is not yet defined in when MYPROFILE_install() is called in MYPROFILE.install. So moved the code over to MYPROFILE.profile and used hook_install_tasks() as explained here: https://www.drupal.org/node/1022020

/**
 * Implements hook_install_tasks().
 */
function MYPROFILE_install_tasks($install_state) {
  $tasks['add_import_link'] = array(
    'display_name' =&gt; st('Adds import link to menu-administrator'),
    'display' =&gt; TRUE,
    'type' =&gt; 'normal',
    'run' =&gt; INSTALL_TASK_RUN_IF_NOT_COMPLETED,
    'function' =&gt; 'callback_add_import_link',
  );

  return $tasks;
}

function callback_add_import_link() {
  // Add the menu link
  $link = array('menu_name' =&gt; 'menu-administrator', 'link_path' =&gt; 'import', 'link_title' =&gt; 'Import', 'weight' =&gt; 5);
  menu_link_save($link);
  menu_rebuild();
}