#18808: Fixing ghost menu items when migrating from 1.4

Work Item: 18808
This commit is contained in:
Sebastien Ros
2012-07-12 11:24:31 -07:00
parent dd3e831934
commit 3c6b27d036

View File

@@ -171,8 +171,8 @@ namespace Orchard.Core.Navigation {
// assign the Main Menu to all current menu items
foreach (var menuItem in _menuService.Get()) {
// if they don't have a position, then they are not displayed
if(string.IsNullOrWhiteSpace(menuItem.MenuPosition)) {
// if they don't have a position or a text, then they are not displayed
if(string.IsNullOrWhiteSpace(menuItem.MenuPosition) || string.IsNullOrEmpty(menuItem.MenuText)) {
continue;
}
menuItem.Menu = mainMenu.ContentItem;