3

Resolved

Navigation: sublevel menuitems displayed in the top level (1.x)

description

As of latest 1.x source (the actual changeset causing the issue is 67f68d26e04c, which is a fix for issue #19457) sublevel menuitems are displayed as if they were in the top level.
See the patch attached for the fix.

file attachments

comments

CSADNT wrote May 27, 2013 at 6:49 AM

Seems that somebody has deleted the issue I created 2 months ago for this ????
I don't think this patch is Ok, problem is not in menuitem but in layout as I reported in the deleted issue.

CSADNT wrote May 27, 2013 at 7:25 AM

I did a check and The error has been introduced in Menu.cshtml (Themes/TheAdmin/Views/) when the Media library was intriduced.

The new test for first, line 76 drives to missing the 1st sub level

<ul class="menuItems">
            @{ var first = true;}    
            @foreach (var secondLevelMenuItem in secondLevelMenuItems.Where(menuItem => !menuItem.LocalNav)) {
                if (first && firstLevelMenuItem.LinkToFirstChild) {
                    first = false;
                    continue;
                }

Before it was

<ul class="menuItems">
            @foreach (var secondLevelMenuItem in secondLevelMenuItems.Where(menuItem => !menuItem.LocalNav)) {
                string secondLevelTextHint = secondLevelMenuItem.Text.TextHint;
                var firstOfTheThird = ((IEnumerable<dynamic>)secondLevelMenuItem.Items).FirstOrDefault();

nightwolf226 wrote May 27, 2013 at 9:52 AM

CSADNT your issue is related to the adminmenu, this one is the for the core feature Navigation.

CSADNT wrote May 27, 2013 at 9:57 AM

Ok, issue title is not explicit and as I have reported same issue for Admin menu....but it seems to have disapeared ?

juFo wrote Jun 12, 2013 at 12:23 PM

In 1.6.1 I have also lots of problems with the navigation that it shows wrong menu items or sometimes completely dissapears.
It is holding me back to use orchard.

BertrandLeRoy wrote Jul 28, 2013 at 2:50 AM

This is a regression.