From 579c572dd84ea49375d19a1aa4da1cdcaa64e3f2 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Tue, 7 Nov 2017 18:36:37 +0100 Subject: [PATCH] Oops, missed that I was passing a string array into the int array param --- .../umbraco/webservices/nodeSorter.asmx.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/nodeSorter.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/nodeSorter.asmx.cs index 026d435936..e7603abe2e 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/nodeSorter.asmx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/nodeSorter.asmx.cs @@ -175,9 +175,16 @@ namespace umbraco.presentation.webservices { var contentService = ApplicationContext.Services.ContentService; try - { + { // Save content with new sort order and update db+cache accordingly - var sorted = contentService.Sort(ids); + var intIds = new List(); + foreach (var stringId in ids) + { + int intId; + if (int.TryParse(stringId, out intId)) + intIds.Add(intId); + } + var sorted = contentService.Sort(intIds.ToArray()); // refresh sort order on cached xml // but no... this is not distributed - solely relying on content service & events should be enough