Oops, missed that I was passing a string array into the int array param

This commit is contained in:
Sebastiaan Janssen
2017-11-07 18:36:37 +01:00
parent bbf4c18825
commit 579c572dd8

View File

@@ -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<int>();
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