I have installed a new fresh installation by 'http://drupal.org/files/projects/drupal-4.7.0-beta6.tar.gz.'.When i want to add a new menu item to replace 'primary links' by 'edit primary links',new menu item cannot be visible.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dww’s picture

Category: bug » feature
Priority: Critical » Normal

i think you're just confused by the new interface for adding primary links (which is very confusing, i'll agree).

if you click on the "edit primary links" link at the top-right of the default theme, you'll go to the admin/menu page. if you scroll down to the bottom of that and click on the "edit" link under "primary links" (a perfectly reasonable thing to do), you'll go to a page where all you can change is the name of the "primary links" menu.

what you really want to do is click on the "add menu item" tab at the top of the admin/menu page, define your new menu item (by giving it a title and a path), and then in the "Parent item" drop-down menu, you need to select "primary links".

that's definitely confusing. you're not crazy (though you didn't give very much information in your bug report).

i think it'd be a great usability feature to have an "add" link under each menu listed on admin/menu, that brought you to the "add menu item" form with the appropriate parent item already filled in. then, folks trying to edit primary links won't be so confused.

this definitely isn't a critical bug, it's just a confusing interface, so i'm changing the status of this issue. i don't know if this feature would be considered for 4.7.0 (since there's now a feature freeze). but, if so, i'd be happy to try to roll a patch for it. can a core developer comment on this?

thanks,
-derek

dww’s picture

Assigned: Unassigned » dww
Status: Active » Needs review
FileSize
1.49 KB

here's a simple patch to provide an "add items" link for each custom menu on the admin/menu summary page. i don't know if a simple usability feature like this could be added to help avoid user-confusion in 4.7, but i doubt it. the good news is this patch will probably apply cleanly to HEAD once that becomes the 4.8 development area.

enjoy,
-derek

killes@www.drop.org’s picture

I think you should take the opportunity to convert the module to the proper form API submit/validate model. Note tht there might be already a patch for that somewhere.

dww’s picture

a quick look at the menu.module code indicates it is already using the forms API in most places. however, admin/menu isn't a form, it's just a table of links to pages that are forms. killes, are you saying i should convert this page to be a form? why is that necessarily better than a table of links to the appropriate admin-related forms? just curious what you have in mind (and why that's an improvement). is the use of "?pid=xxx" in the url considered a bad idea? seems like project.module still relies heavily on urls with arguments. i don't know of any other good way to pass the info into the admin/menu/item/add page, since that's a shared form with admin/menu/item/edit, and that expects the final part of the URL to be the menu id (mid) of the menu item to edit, not the parent id (pid) of the menu to add...

thanks,
-derek

dww’s picture

sorry about that... in my haste i saw forms but didn't look closely enough to realize it was old-school forms, not the new FAPI. in any case, once node/55132 is committed, menu.module will be using the new FAPI (thanks, zen!). so, here's a new patch for this feature that takes advantage of the goodness in zen's FAPI conversion patch, and (hopefully) implements this usability feature in a cleaner way. review/comments please.

thanks,
-derek

p.s. just to be clear, "menu-fapi_add_items_link.patch" depends on either menu_fapi_inc.patch or menu_fapi_inc_1.patch from node/55132

dww’s picture

here's another version that also updates the help text about the new link. this will only apply cleanly once menu_fapi_inc_2.patch is commited from node/55132.

dww’s picture

now that #55132 is commited, i re-created the patch to apply cleanly against the current head of CVS: revision 1.70 (zen's changes to the help text caused 1 hunk to fail from the previous patch).

Zen’s picture

Title: menu item cannot be added to 'primary links' » Menu module - improve usability and help text
Version: 4.7.0-beta6 » x.y.z
Category: feature » task
Status: Needs review » Needs work

Hi :)

The 'add' link is a nice improvement :) The help text and comments added could use a little work though. Please try to be simple and concise in both of them - the help text sounds like you're describing this patch ;) While fixing the help text, could you also please make the text on the 'admin/menu' screen a little more useful? Explaining the difference between a menu and a menu item, and also linking to the 'settings' page should help immensely :) And lastly, is there a reason you prefer to use double spaces after a period?

Cheers :)
-K

dww’s picture

Status: Needs work » Needs review
FileSize
5.52 KB

ok, here's a new version incorporating zen's suggestions:

  • more concice help text on admin/help/menu
  • more verbose help text on admin/menu (still trying to be concise and simple), with useful links
  • slightly less verbose comment explaining the $pid to use in menu_edit_item_form()
  • single spaces after .

i tried to be consistent in the formatting (both of the text and the code) with the help text in block.module and a few others i looked at... (e.g. "page" is include as part of the link for things like "menu settings page", i'm using multiple paragraphs, etc).

additionally, i made it so the "add item" link appears for "navigation", too (to be more consistent).

ok, is this RTBC yet? ;) geeze... this "simple" improvement has taken a few hours of my life now...

thanks,
-derek

Zen’s picture

FileSize
8.68 KB

Quick patch. Help text improvements and moved the add item link back below the menu links - I think it was better there :)

Anyways, we are under orders to quit fooling around with help text and go fix some bugs ;)

-K

dww’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
8.59 KB

ok, here's a (hopefully final!) edit of these damn help pages. ;) i just trimmed down a few things that were extra wordy, changed "primary menu links" to just "primary links" (since that's what they're always refered to), and a few other tiny edits. ok, this is hereby RTBC (i know it's probably uncool to set that for my own patch, but hell, we've gone over this one enough already). the original tiny usability feature is still in here, which is all i really care about, but the new text is a nice improvement, too...

thanks,
-derek

webchick’s picture

Please take any changes you've made to the admin/help#menu text and update the menu module handbook page with it. The core modules' help text was automatically generated from those handbook pages, and once I update my script after Drupal.org switches to 4.7 RC, any changes to admin/help text that are not in the handbook will be overwritten in subsequent updates.

Zen’s picture

@webchick - Righto - so do I have to create an issue for that? I don't believe I have the perms to add new revisions. I'm actually pretty sure that a lot of docs have possibly changed - some by yours truly (usually minor fixes). I was unaware of this procedure. I would personally prefer it to be the other way around - drupal.org is updated from core. Makes more sense that way. This is a little too bureaucratic :D

@dww - thanks mate :) The reset menus feature labels primary link menus incorrectly it seems..

-K

killes@www.drop.org’s picture

@Zen: so the patch needs work?

Zen’s picture

It is good to go.

-K

dww’s picture

@webchick: i totally agree w/ zen. this whole process of handbook pages and help text seems very strange. ;) i don't think this particular issue is the best place to have the discussion/debate about it, though. should i make a forum post about it? email development? thanks.

@zen: you mean the "reset all menus" tab that you moved into devel.module (revision 1.66, #53654)? yeah, i see what you mean. i just committed a fix for that (revision 1.71).

@killes: yes, it's still RTBC. ;)

thanks, all!
-derek

drumm’s picture

I think this should wait for 4.8.

Outside the scope of this issue, but relevant, we should standardize a UI guideline for wording of operations columns.

dww’s picture

even though the title's been changed a few times, let's not lose sight of the original problem. i regular user was totally confused (for good reason) and created an issue saying "i can't edit my primary links" because the existing interface is so confusing. the change for primary links is going to be one of the big gotchas for users upgrading from 4.6 -> 4.7. this is a simple fix (3 lines of actual code) plus a bunch of improvements to the help text. i can't see any reasonable argument that making the help text more clear is going to introduce bugs. ;) if you don't like the 3 lines of the new interface (two of which just rename existing links to be more clear), please propose an alternative, but i think it'd be lame to subject users to the existing UI for 4.7.0...

a few clueful folks have already commented that the UI provided by this patch is an improvement. drupal gets enough crap for being hard to use as it is... if people like zen and myself are willing to work on usability, let's actually get it in. otherwise, it's just going to discourage us from spending the time on these kinds of issues, which would be a shame...

thanks,
-derek

drumm’s picture

Sorry, RC1 has already gone out, so no non-trivial UI changes should go in at this point.

I'll be happy to do a more complete review and hopefully comitting after 4.7 is released.

dww’s picture

Not to be too much of a pain about this, but i just tried setting up a brand new 4.7 site (for my day job!). i was trying to define some primary links, and reminded myself once again what a huge pain in the ass it is using a current UI. ;) everytime you want to add a primary link, when you try to use the drop-down box to select the parent, you have to scroll through the *entire* navigation menu (even items that are disabled) to get down to the *very* bottom of the list where the primary links menu is. :( to make matters worse, i had already enabled the project module on the site before defining the primary links, so there was even more junk to scroll through for each new primary link. i have a ton of love for drupal, but this is really sucky, and i'm sure a lot of users are going to complain about this. pretty, pretty please, can we add the "add item" link? here's another bare-bones patch that doesn't rename the existing links and doesn't touch the help text. i think this would be a shame, but if y'all can be persuaded to commit just this, that'd be a start. please, try to setup a site for yourself and see just what a pain in the ass it is to add primary links in 4.7, then reconsider if either of these tiny patches for a huge usability win can't be applied. ;) thanks!

killes@www.drop.org’s picture

Status: Reviewed & tested by the community » Fixed

applied

dww’s picture

Status: Fixed » Reviewed & tested by the community
FileSize
6.98 KB

thanks, killes!

here's a new patch with just the help text improvements... this is lower prio, i guess, but since zen and i put the work in and it's *only* making the help text better, i don't see any harm in committing this, either...

killes@www.drop.org’s picture

Status: Reviewed & tested by the community » Fixed

applied

Anonymous’s picture

Status: Fixed » Closed (fixed)