From 005517c75152a40acc0ffa41db455d22b91564cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20M=C3=A1t=C3=A9?= Date: Wed, 16 Oct 2024 00:34:18 +0200 Subject: [PATCH 1/2] Fixing InvalidOperationException --- .../Services/OrchardExportToRecipeConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.HelpfulExtensions/Extensions/OrchardRecipeMigration/Services/OrchardExportToRecipeConverter.cs b/Lombiq.HelpfulExtensions/Extensions/OrchardRecipeMigration/Services/OrchardExportToRecipeConverter.cs index 4229066..29ddbeb 100644 --- a/Lombiq.HelpfulExtensions/Extensions/OrchardRecipeMigration/Services/OrchardExportToRecipeConverter.cs +++ b/Lombiq.HelpfulExtensions/Extensions/OrchardRecipeMigration/Services/OrchardExportToRecipeConverter.cs @@ -73,7 +73,7 @@ await _contentConverters } var recipe = JObject.FromObject(new RecipeDescriptor())!; - recipe["steps"] = JObject.FromObject(new[] { new { name = "content", data = contentItems } }); + recipe["steps"] = JObject.FromObject(new { steps = new[] { new { name = "content", data = contentItems } } }); return recipe.ToString(); } From bd04b1c3d3083555e9da3a721bd17709f4fadbca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20M=C3=A1t=C3=A9?= Date: Wed, 16 Oct 2024 15:55:19 +0200 Subject: [PATCH 2/2] Formatting steps as array --- .../Services/OrchardExportToRecipeConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.HelpfulExtensions/Extensions/OrchardRecipeMigration/Services/OrchardExportToRecipeConverter.cs b/Lombiq.HelpfulExtensions/Extensions/OrchardRecipeMigration/Services/OrchardExportToRecipeConverter.cs index 29ddbeb..f849991 100644 --- a/Lombiq.HelpfulExtensions/Extensions/OrchardRecipeMigration/Services/OrchardExportToRecipeConverter.cs +++ b/Lombiq.HelpfulExtensions/Extensions/OrchardRecipeMigration/Services/OrchardExportToRecipeConverter.cs @@ -73,7 +73,7 @@ await _contentConverters } var recipe = JObject.FromObject(new RecipeDescriptor())!; - recipe["steps"] = JObject.FromObject(new { steps = new[] { new { name = "content", data = contentItems } } }); + recipe["steps"] = new JsonArray(JObject.FromObject(new { name = "content", data = contentItems })); return recipe.ToString(); }