That pretty much sums it up. I'm using the latest cvs.

CommentFileSizeAuthor
#2 Picture 1_1.pdf272.44 KBpeterjohnhartman

Comments

Richard Archer’s picture

I'm assuming you went to admin/menu and clicked "add menu item". Rather than using the menu_otf feature.

What path did you enter?

I can't reproduce this problem and a quick code audit reveals no obvious errors.

peterjohnhartman’s picture

StatusFileSize
new272.44 KB

There is no path field, which is the main problem. According to the code, it is hidden. (Keep in mind, I am using the latest cvs version.) Attached is a pdf screenshot of what I entered and the error.

Richard Archer’s picture

I can't see how that can happen.

You click "add menu item".
menu_edit_item() is called-back
$mid == 0 so menu_edit_item_form is called with

$edit = array (
  'mid' => 0,
  'pid' => 1,
  'type' => MENU_VISIBLE_IN_TREE | MENU_VISIBLE_IN_BREADCRUMB | MENU_CREATED_BY_ADMIN | MENU_MODIFIABLE_BY_ADMIN,
)

$edit['pid'] != 0 so the else is executed
$edit['type'] & MENU_CREATED_BY_ADMIN is true so the form item is created with:

$form['path'] = array('#type' => 'textfield', 
'#title' => t('Path'), 
'#default_value' => $edit['path'], 
'#description' => $path_description, 
'#required' => TRUE);

Can you post your menu.module (or email it to me)?

Are you running any other modules that might interfere with this?

peterjohnhartman’s picture

Status: Active » Closed (won't fix)

It was another module (a custom one) modifying form_alter.