diff --git a/src/Umbraco.Web/Trees/ContentTreeController.cs b/src/Umbraco.Web/Trees/ContentTreeController.cs index 91a4a9452f..1d91481c81 100644 --- a/src/Umbraco.Web/Trees/ContentTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentTreeController.cs @@ -131,7 +131,7 @@ namespace Umbraco.Web.Trees } // add default actions for *all* users - allowedMenu.AddMenuItem(); + allowedMenu.AddMenuItem().ConvertLegacyMenuItem(null, "content", "content"); allowedMenu.AddMenuItem(true); return allowedMenu; } diff --git a/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs b/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs index 56ba066f2d..787386179e 100644 --- a/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs +++ b/src/Umbraco.Web/Trees/LegacyTreeDataConverter.cs @@ -266,7 +266,7 @@ namespace Umbraco.Web.Trees case "UmbClientMgr.appActions().actionRePublish()": return Attempt.Succeed( new LegacyUrlAction( - "dialogs/republish.aspx?rnd=" + nodeId + "&rnd=" + DateTime.UtcNow.Ticks, + "dialogs/republish.aspx?rnd=" + DateTime.UtcNow.Ticks, "Republishing entire site")); case "UmbClientMgr.appActions().actionAssignDomain()": return Attempt.Succeed( diff --git a/src/Umbraco.Web/Trees/Menu/MenuItemExtensions.cs b/src/Umbraco.Web/Trees/Menu/MenuItemExtensions.cs index 88b62463ca..0576991eac 100644 --- a/src/Umbraco.Web/Trees/Menu/MenuItemExtensions.cs +++ b/src/Umbraco.Web/Trees/Menu/MenuItemExtensions.cs @@ -65,13 +65,18 @@ namespace Umbraco.Web.Trees.Menu { //First try to get a URL/title from the legacy action, // if that doesn't work, try to get the legacy confirm view + + //in some edge cases, item can be null so we'll just convert those to "-1" and "" for id and name since these edge cases don't need that. Attempt - .Try(LegacyTreeDataConverter.GetUrlAndTitleFromLegacyAction(menuItem.Action, item.Id.ToInvariantString(), nodeType, item.Name, currentSection), + .Try(LegacyTreeDataConverter.GetUrlAndTitleFromLegacyAction(menuItem.Action, + item == null ? "-1" : item.Id.ToInvariantString(), + nodeType, + item == null ? "" : item.Name, currentSection), action => menuItem.LaunchDialogUrl(action.Url, action.DialogTitle)) .OnFailure(() => LegacyTreeDataConverter.GetLegacyConfirmView(menuItem.Action, currentSection), - view => menuItem.LaunchDialogView( - view, - ui.GetText("defaultdialogs", "confirmdelete") + " '" + item.Name + "' ?")); + view => menuItem.LaunchDialogView( + view, + ui.GetText("defaultdialogs", "confirmdelete") + " '" + item.Name + "' ?")); } } } \ No newline at end of file