We have moved to GitHub Issues
You are viewing the read-only archive of Umbraco's issue tracker. To create new issues, please head over to GitHub Issues.
Make sure to read the blog posts announcing the move for more information.
Created by Stephan 29 Jan 2016, 12:11:43 Updated by Shannon Deminick 03 Feb 2016, 12:59:09
After commits 73f1458190b4a98470cdc0fa4de5f46159ca3e97 and ce3028446b154beaf6b92a19d873af0cc8c36aec the code in ContentTypeBaseRepository.Move
now looks like:
//update all descendants, update in order of level
var descendants = this.GetByQuery(
new Query
var lastParent = toMove;
foreach (var descendant in descendants.OrderBy(x => x.Level))
{
moveInfo.Add(new MoveEventInfo<TEntity>(descendant, descendant.Path, descendant.ParentId));
descendant.ParentId = lastParent.Id;
descendant.Path = string.Concat(lastParent.Path, ",", descendant.Id);
//schedule it for updating in the transaction
AddOrUpdate(descendant);
lastParent = descendant;
}
This does not work for graphs. Ie if the structure is that toMove has children child1 and child2, *when child1 is processed, lastParent == toMove and child1.ParentId is set to toMove.Id :: correct *then lastParent is set to child1 *when child2 is processed, lastParent == child1 and child2.ParentId is set to child1.Id :: wrong
Managing paths should be done in the repository, not in the service (see also what we do for content items) but that has other issues with events...
Need to determine if this affects 7.3.6 or not and reassign if needed
Does ''not'' affect 7.3 - only 7.4.
Test: create a tree of content types (multiple levels, multiple children) - move the top content type around - check in database: all paths & levels & parentID should be OK
I've merged this in, it all seems to work but I couldn't really replicate the issue to begin with.
Priority: Normal
Type: Bug
State: Fixed
Assignee:
Difficulty: Normal
Category:
Backwards Compatible: True
Fix Submitted:
Affected versions: 7.4.0
Due in version: 7.4.0
Sprint: Sprint 8
Story Points:
Cycle: