Bugfix: Don't increase the page number in the loop, because the items are moved to another subtree, and therefore is not any longer part of the descendants call. Now we avoid the leak of items when moving to recycle bin.

This commit is contained in:
Bjarke Berg
2019-06-12 10:39:34 +02:00
parent 39d93a7ace
commit 5b546cc425

View File

@@ -1930,7 +1930,7 @@ namespace Umbraco.Core.Services.Implement
var total = long.MaxValue;
while (page * pageSize < total)
{
var descendants = GetPagedDescendantsLocked(originalPath, page++, pageSize, out total, null, Ordering.By("Path", Direction.Ascending));
var descendants = GetPagedDescendantsLocked(originalPath, page, pageSize, out total, null, Ordering.By("Path", Direction.Ascending));
foreach (var descendant in descendants)
{
moves.Add(Tuple.Create(descendant, descendant.Path)); // capture original path