U4-2361 - Content rollback generates duplicates, which cannot be removed from the tree

Created by Bo Kingo Damgaard 13 Jun 2013, 12:57:57 Updated by Jeavon Leopold 03 Sep 2013, 11:01:56

Relates to: U4-2763

When rolling back a change in the content section, the node that you rolled back, is duplicated, including all childnodes. The node that you rolled back is marked as unpublished (marked by a star), and the duplicated node is marked as published. If you delete either node, both nodes are moved to the trashcan, hence it's not easy to remove again.

Steps to reproduce:

  1. Install Umbraco
  2. Install Simple Starter Kit
  3. Make a change on the "Simple website" content node.
  4. Save
  5. Right click the node and select "Rollback".
  6. Select the second version from the top, and click "Rollback"
  7. Refresh the Content tree, and you have duplicates.


Bo Kingo Damgaard 13 Jun 2013, 13:20:47

UPDATE: It shows duplicates because the node has two entries in cmsDocument with newest=1. If I set newest=0 on one of them, that one dissapears from the three

David Pendray 13 Jun 2013, 14:08:10

I can reproduce this. I'm looking into why this is happening now.

Nicholas Westby 30 Aug 2013, 18:24:04

I have reopened this because it says that it is due in version 6.1.2, but I just came across the issue in 6.1.3. Perhaps Morten can comment on this?

Morten Christensen 31 Aug 2013, 16:21:25

@Nicholas As far as I remember the issue with duplicate nodes was due to either orphan nodes or two versions of the same node being marked as latest = 1 as Bo mentioned above. The rollback thing should was fixed in 6.1.2. There was a change around 6.1.3 that caused a similar issue, but as far as I remember that was only in a nightly build. But since 6.1.4 is out it might be an idea to upgrade to the latest version.

Sebastiaan Janssen 31 Aug 2013, 17:22:30

@Nicholas If upgrading doesn't help, please create a new issue for it. Thanks!

Sebastiaan Janssen 01 Sep 2013, 13:58:53

I managed to reproduce this using the steps above and created issue U4-2763 for it.

Jeavon Leopold 03 Sep 2013, 11:01:56

FYI, if you have a site affected, upgrading doesn't fix the bad data. I had 4 duplicates showing in my tree (created by distributed server calls) but only 2 rows with newest=1 in the cmsDocument table, setting one of the rows to 0 changed the tree to have only 2 duplicates, republishing that node again and then tree was back to 1, phew!

In case it's useful to anyone else, here's the SQL I used to find the problem nodes select [nodeId], [versionId], [newest], [updateDate] from [cmsDocument] where newest=1 and nodeId in ( SELECT [nodeId] FROM [cmsDocument] where newest = 1 group by nodeId having COUNT(*) > 1 ) order by nodeId, updateDate Then having found the problem nodes, update the row by versionId update [cmsDocument] set newest = 0 where versionId = '28B1BBE4-93F9-4DFB-B392-FF8B1EE1B9CD';

Priority: Critical

Type: Bug

State: Fixed

Assignee: Morten Christensen

Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 6.1.0, 6.1.1

Due in version: 6.0.7, 6.1.2


Story Points: