diff --git a/src/OrchardCore.Modules/OrchardCore.AdminDashboard/Migrations/dashboard-widgets.recipe.json b/src/OrchardCore.Modules/OrchardCore.AdminDashboard/Migrations/dashboard-widgets.recipe.json index c3343fab0cd..768cc0612d8 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminDashboard/Migrations/dashboard-widgets.recipe.json +++ b/src/OrchardCore.Modules/OrchardCore.AdminDashboard/Migrations/dashboard-widgets.recipe.json @@ -58,30 +58,6 @@ ] } ] - }, - { - "name": "content", - "data": [ - { - "ContentItemId": "[js: uuid()]", - "ContentType": "HtmlDashboardWidget", - "DisplayText": "Orchard Core", - "Latest": true, - "Published": true, - "HtmlDashboardWidget": {}, - "DashboardPart": { - "Position": 0.0, - "Width": 1.0, - "Height": 2.0 - }, - "HtmlBodyPart": { - "Html": "" - }, - "TitlePart": { - "Title": "Orchard Core" - } - } - ] } ] -} \ No newline at end of file +} diff --git a/src/OrchardCore.Modules/OrchardCore.AdminDashboard/Recipes/dashboard-widgets-samples.recipe.json b/src/OrchardCore.Modules/OrchardCore.AdminDashboard/Recipes/dashboard-widgets-samples.recipe.json new file mode 100644 index 00000000000..3782813b455 --- /dev/null +++ b/src/OrchardCore.Modules/OrchardCore.AdminDashboard/Recipes/dashboard-widgets-samples.recipe.json @@ -0,0 +1,37 @@ +{ + "name": "dashboard-widgets-samples", + "displayName": "Admin Dashboard Widget Sample", + "description": "Provides a sample Admin Dashboard Widget.", + "author": "The Orchard Core Team", + "website": "https://orchardcore.net", + "version": "1.0.0", + "issetuprecipe": false, + "categories": [ "default" ], + "tags": [], + "steps": [ + { + "name": "content", + "data": [ + { + "ContentItemId": "[js: uuid()]", + "ContentType": "HtmlDashboardWidget", + "DisplayText": "Orchard Core", + "Latest": true, + "Published": true, + "HtmlDashboardWidget": {}, + "DashboardPart": { + "Position": 0.0, + "Width": 1.0, + "Height": 2.0 + }, + "HtmlBodyPart": { + "Html": "" + }, + "TitlePart": { + "Title": "Orchard Core" + } + } + ] + } + ] +} diff --git a/src/OrchardCore.Modules/OrchardCore.Recipes/Controllers/AdminController.cs b/src/OrchardCore.Modules/OrchardCore.Recipes/Controllers/AdminController.cs index a434f8db409..6a2db2541dd 100644 --- a/src/OrchardCore.Modules/OrchardCore.Recipes/Controllers/AdminController.cs +++ b/src/OrchardCore.Modules/OrchardCore.Recipes/Controllers/AdminController.cs @@ -130,9 +130,9 @@ private async Task> GetRecipesAsync(IEnumerable x.HarvestRecipesAsync())); var recipes = recipeCollections.SelectMany(x => x) - .Where(r => r.IsSetupRecipe == false && - !r.Tags.Contains("hidden", StringComparer.InvariantCultureIgnoreCase) && - features.Any(f => r.BasePath.Contains(f.Extension.SubPath, StringComparison.OrdinalIgnoreCase))); + .Where(r => !r.IsSetupRecipe && + (r.Tags == null || !r.Tags.Contains("hidden", StringComparer.InvariantCultureIgnoreCase)) && + features.Any(f => r.BasePath != null && f.Extension?.SubPath != null && r.BasePath.Contains(f.Extension.SubPath, StringComparison.OrdinalIgnoreCase))); return recipes; } diff --git a/src/docs/releases/1.7.0.md b/src/docs/releases/1.7.0.md new file mode 100644 index 00000000000..628b7140997 --- /dev/null +++ b/src/docs/releases/1.7.0.md @@ -0,0 +1,9 @@ +# Orchard Core 1.7.0 + +Release date: Not yet released + +## Change Logs + +### `OrchardCore.AdminDashboard` Module + +A sample widget is no longer auto created when the `OrchardCore.AdminDashboard` feature is enabled. If you like to see a sample widget, you may do so by executing the "Admin Dashboard Widget Sample" recipe by using the admin menu and navigate to **Configuration** >> **Recipes**