the menu is not being displayed when the first parameter is user My problem is as follows the path user/%user_uid_only_optional/profile is not displayed.
If I try a variation of this and instead of having user, I replace user with usr the menu items is displayed. I know there was an issue with the page callback and I understand the issue of why it didnt work. That a boolean variable is not an expectable parameter for the page callback.


Line 1: line one is taken from the pro development book.
Line 2: line two shows the title (the title is displayed this line
works)
Line 3: description is correct i checked syntax
Line 4: the page callback seems fine unless this isn't the correct
format. I am quite sure that it follows what is in the
documentation.
Line 5: the number of arguments are needed is one. Since I have only
one %
Line 6: access arguments seems to be ok i checked the different
permission in drupal under users and that is the edit person that i
used.
Line 7: I looked at the menu type and it discusses at the parents
level if you want to use the local version of the menu you type

$items['usr/%currentuser/edit'] = array(
    'title' =&gt; 'Profile', // The link text
    'description' =&gt; 'My Profile',
    'page callback' =&gt; 'editprofile', // the function to be called when link is clicked [below]
    'page arguments' =&gt; array(1), // arguments for the callback function 'profile_use_page'
    'access arguments' =&gt; array('edit own profile'),
    'type' =&gt; MENU_NORMAL_ITEM,
    'menu_name' =&gt; 'user-menu', // You'll need to have a menu named my_menu for this to work
                              // If not specified, it will default to 'navigation'
  );



   

    function editprofile($user_id) {
      return 'user_id'. $user_id;
    }
From https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_menu/7:

"page callback": The function to call to display a web page when the user visits the path. If omitted, the parent menu item's callback will be used instead.

So page callback has to be omitted to fallback on the parents callback or has to be a function.