U4-4695 - Copy document type to new parent seems to lose some data

Created by Damian Green 14 Apr 2014, 23:19:09 Updated by Damian Green 22 Apr 2014, 10:23:52

Relates to: U4-2843

Not sure what is missing or corrupted but when i click on a copied document type in the tree it forces the tree to reload.

If i manually add a child to the parent node and clock on that it is fine and the content loads in the right hand window.

The content still loads in the right hand window for the copied document type but the tree reloading means you always lose your place as the tree jumps and the parent is collapsed.

Also I think there is a further issue here that my gut feeling is that it is linked:

If you copy a document type to a new parent and then go and edit the coped document type when you save it the document get re-attached to the original parent before the copy. I have a feeling this is because it is using a cache of the document type?

FYI - I had something similar going on when i was using a local and remote database at the same time with dev/live on another project (not v7).


Sebastiaan Janssen 21 Apr 2014, 11:50:37

I can't reproduce the losing data part or the forced tree reload? I might be misunderstanding the tree reload issue, would be good if you could expand on that.

I can definitely repro the master doctype is indeed changing back to the one where you copied it from.

Shannon Deminick 21 Apr 2014, 23:40:45

I will see if i can reproduce, @sebastiaan most likely related to the caching issue: http://issues.umbraco.org/issue/U4-4259

Regarding the tree issue, this is most likely a javascript problem.

Shannon Deminick 22 Apr 2014, 04:10:05

I can reproduce all of these issues, working on it now.

Shannon Deminick 22 Apr 2014, 07:52:12

Problem was due to a bug in the copying logic with the new API, have now created a service method called "Copy" to do this with tests. The other problem was the cloning logic used to copy the object since it wasn't a deep clone - so is related to the caching/deep cloning stuff which fixes this.

Damian Green 22 Apr 2014, 10:23:52

Not been online for a few days... looks like you have nailed it anyway! :)

Priority: Major

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 6.1.6, 7.1.1

Due in version: 6.2.0, 7.1.2


Story Points: