Steps to reproduce
on admin/structure/menu/settings set Source for the Main links to "No Main links"

Behavior expected
No error messages
Complete description (get rid of the ...(currently )...?

Current behavior
Because the Main links are empty it results in an incomplete description - http://drupal.org/files/menumainlinks_bug.png

Comments

sign’s picture

forgot to add that the notice is:
"Notice: Undefined index: in menu_configure() (line 682 of /sites/d7cvs/www/modules/menu/menu.admin.inc)."

jcarlson34’s picture

I see the same message upon navigating to the menu section as well.

yoroy’s picture

Subscribe, same here.

jcarlson34’s picture

Status: Active » Needs work

Here's the code from line 682:

'#description' => t('Select the source for the Secondary links. An advanced option allows you to use the same source for both Main links (currently %main) and Secondary links: if your source menu has two levels of hierarchy, the top level menu links will appear in the Main links, and the children of the active link will appear in the Secondary links.', array('%main' => $menu_options[$main])),

The %menu variable from the array is coming back without a value, leading to the undefined index warning.

The simple fix would be to just delete the %menu stuff like this:

'#description' => t('Select the source for the Secondary links. An advanced option allows you to use the same source for both Main links and Secondary links: if your source menu has two levels of hierarchy, the top level menu links will appear in the Main links, and the children of the active link will appear in the Secondary links.'),
davidneedham’s picture

Same issue here.

davidneedham’s picture

For what it's worth, a quick fix is disabling the main and secondary menus from the theme settings page (/admin/appearance/settings/yourdefaultthemename). That seems to work without any problems.

hjmichael’s picture

Hello,
I have the same issue on a fresh D7 install using the Marinelli theme.

jcarlson34’s picture

Status: Needs work » Needs review
StatusFileSize
new1.21 KB

Ok I put together a patch for #4.

Status: Needs review » Needs work

The last submitted patch, 983746-menu.admin_.patch, failed testing.

agentrickard’s picture

Status: Needs work » Needs review
StatusFileSize
new1.56 KB

First Git patch!

swentel’s picture

Status: Needs review » Reviewed & tested by the community

Bot is happy and I want my 2 beers!

jcarlson34’s picture

Nice work agentrickard. Thanks for fixing this!

agentrickard’s picture

@jcarlson34

I used it as an easy excuse to test my Git skillz. (Plus I have #1078266: Undefined index: in domain_conf_domainbatch() in my queue, which is a direct result of copy/paste of this code. :-)

dawehner’s picture

Version: 7.x-dev » 8.x-dev
Issue tags: +Needs backport to D7
alexanderpas’s picture

I don't think (currently No Main links) is the best message to show, but it is good enough. (also Subscribe.)

webchick’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

I actually ended up committing a slightly different fix in a separate issue: #1021064: No Main Links causes error message in form description to set Secondary Links