Page arguments - hook_menu I have this two test menu items:

  $items['test/%id'] = array(
    'title' =&gt; 'Test',
    'type' =&gt; MENU_LOCAL_TASK,
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('my_module_form', 1),
    'load arguments' =&gt; array('%map'),
    'access arguments' =&gt; array(1),
  );

  $items['test/new/%new_id'] = array(
    'title' =&gt; 'Test',
    'type' =&gt; MENU_LOCAL_TASK,
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('my_module_form', 2),
    'load arguments' =&gt; array('%map'),
    'access arguments' =&gt; array(2),
  );


Here is the fr_module_form function:

function my_module_form($form, &amp;$form_state, $id = NULL, $new_id = NULL) {
  dsm($id, 'id');
  dsm($new_id, 'new_id');
  return '';
}


Here is the problem. When I visit (for instance): test/my-test-var 
dsm(1) function returns $id => my-test-var
dsm(2) function returns $new_id => 

but when I visit: test/new/my-test-var
dsm(1) function returns the same as above which is:
$id => my-test-var so it's not $new_id as I've expected.
dsm(2) is still empty

Moreover if I visit /test/new/my-test-var/my-second-test-var I get:
dsm(1): $id => my-test-var
dsm(2): $new_id => my-second-test-var

Why do I 'tell' drupal in 'page arguments' which argument should be used? I always get the first argument from my_module_form. 

How to separate it?
Path parts are passed to the menu callback function with a zero index as the first path part i.e. 

First url:
array(0 =&gt; 'test', 1 =&gt; '%id')

Second url: 
array(0 =&gt; 'test', 1 =&gt; 'new', 2 =&gt; '%new_id')

Your form function expects two arguments but you only ever give it one.

In your form function arguments, this: $id = NULL, $new_id = NULL corresponds to this array('my_module_form', first_argument, second_argument) in your menu callback args. So you are only ever giving your form function one argument from the menu.
Try this in your second menu item:

'page arguments' =&gt; array('my_module_form', 1, 2),


This will provide two arguments for the form callback function. Your first menu item will return null for $new_id, because you don't have further path parts to provide from the url.