--- menu_add_content.module.old	2010-09-17 12:12:34.000000000 +0200
+++ menu_add_content.module	2010-09-17 12:23:04.000000000 +0200
@@ -40,20 +40,22 @@
  * Preset the menu data
  */
 function menu_add_content_form_alter(&$form, &$form_state, $form_id) {
+  // Test for node_form
+  if (isset($form['type']) && isset($form['#node']) && $form['type']['#value'] .'_node_form' == $form_id) {
+    $parent_menu_item = arg(3);
+    $menu_name = arg(4);
+    if(is_numeric($parent_menu_item) && !empty($menu_name)){ 
+      $form['menu']['parent']['#default_value'] = $menu_name.":".$parent_menu_item;
+      $form['menu']['menu_added_content'] = array('#type' => 'value', '#value' => true);
+    }
+    menu_add_content_update_menus();
+    return;
+  }
   switch ($form_id) {
     case 'menu_item_delete_form':
     case 'menu_edit_item':
       menu_add_content_update_menus(); 
       break;
-    case 'page_node_form':
-      $parent_menu_item = arg(3);
-      $menu_name = arg(4);
-      if(is_numeric($parent_menu_item) && !empty($menu_name)){ 
-        $form['menu']['parent']['#default_value'] = $menu_name.":".$parent_menu_item;
-        $form['menu']['menu_added_content'] = array('#type' => 'value', '#value' => true);
-      }
-      menu_add_content_update_menus();
-      break;  
     case 'menu_overview_form':
     //hide all Add Content items in menu overview (respectively add CSS class so it can be hidden)
       $add_content_menus = variable_get('menu_add_content_menus','');
@@ -353,4 +355,4 @@
 
 
 
-?>
\ No newline at end of file
+?>
