I have 3 menu items at the 2nd structural level of my left side nav menu. The structure is as follows. As shown in the screenshot when I click the Test Sub Menu the 3 menu items belonging to Test Sub Menu do not show. If you want to reproduce this issue just add the below code to your class that implements the IMenuContributor interface.
Test Menu 1 Test Sub Menu Test Menu Item 1 Test Menu Item 2 Test Menu Item 3
Code to reproduce
var miMenu1 = new ApplicationMenuItem(
name: "TestMenu1",
displayName: "Test Menu 1",
elementId: "TestMenu1",
order: 1
).RequireAuthenticated();
var miMenu1SubMenu1 = new ApplicationMenuItem(
name: "TestMenu1SubMenu1",
displayName: "Test Sub Menu",
elementId: "TestMenu1SubMenu1",
order: 1
).RequireAuthenticated();
miMenu1SubMenu1.Items.Add(
new ApplicationMenuItem (
"TestMenuItem1",
"Test Menu Item 1",
"TestMenuItem1",
order: 1
).RequireAuthenticated());
miMenu1SubMenu1.Items.Add(
new ApplicationMenuItem(
"TestMenuItem2",
"Test Menu Item 2",
"TestMenuItem2",
order: 2
).RequireAuthenticated());
miMenu1SubMenu1.Items.Add(
new ApplicationMenuItem(
"TestMenuItem3",
"Test Menu Item 3",
"TestMenuItem3",
order: 3
).RequireAuthenticated());
miMenu1.Items.Add(miMenu1SubMenu1);
//Add Application Security Group menu item
context.Menu.GetAdministration().AddItem(miMenu1);