U4-1547 - Upgrading to v6.0 RC: duplicate nodes "Packages" and "Relation Types" in Developer Section

Created by Arie 25 Jan 2013, 04:49:43 Updated by Sebastiaan Janssen 31 May 2013, 08:52:05

After upgrading from 4.11.3, I have two nodes called "Packages" and "Relation Types" in the Dev Section.

Here's a screen capture from Phill, who encountered a very similar scenario:



Asbjørn Riis-Knudsen 25 Jan 2013, 09:36:15

Yes, I noticed that as well. Overwriting trees.config with a fresh fixes it, but it shouldn't happen.

esunxray 25 Jan 2013, 13:22:24

Yes, overwrited trees.config, This bug will disappear.

Arie 25 Jan 2013, 20:32:42

That's curious. When I compared the trees.config from the 6.0 package to the one on the server they were identical except for some blank lines and the date. However, overwriting the one on the server did indeed resolve the issue.

Morten Christensen 25 Jan 2013, 21:02:20

I'm curious as to how you upgraded the site, which resulted in this. Did you leave the tree.config from the previous version, overwrite it with the one from the v6 package or merge the two? I have tested the upgrade a few times, but haven't seen this issue before. So steps to reproduce is greatly appropriated. Also, please post the tree.config after your upgrade with the duplicate trees.

Thanks, Morten

Arie 25 Jan 2013, 23:54:25

Based on the differences between the 4.11.3 version and the 6.0 version I am quite sure I overwrote the old one when I copied all the files. I have a few more site that I'll be upgrading soon so I'll pay closer attention on those. In addition, I've enabled verbose logging in Beyond Compare so I'll be able to supply details on future upgrades.

Jan Skovgaard 26 Jan 2013, 14:59:19

Hi Arie

Make sure not to just overwrite the files - I suggest you merge them using winmerge instead. I advise you to do so because it can cause trouble if you just overwrite the files if you are making use of packages etc. that writes to the files or if you have some custom configuration in the umbracoSettings.config for instance.

If you already do the above, nevermind me then - just want to make sure you're not getting into trouble :)

Arie 26 Jan 2013, 15:57:16

Hi Jan,

Thanks for the warning - much appreciated! However, I already examine all files before I overwrite them. You mentioned WinMerge, but I find that Beyond Compare's side-by-side folder compare makes the process so much more transparent that it's more than worth the $30. :-)

William Burnett 26 Jan 2013, 17:29:32

I have the same issue, however my Developer nodes where normal until I uninstalled a package, after which a second Relation Types node appeared. Something is certainly wrong. 4.9 to 4.10 to 4.11 to 6.0 upgrade IIS6 SQL 2005E

Sebastiaan Janssen 27 Jan 2013, 15:51:37

I was not able to replicate this reliably, but I did just see the same issue during an upgrade.

It feels like there is some item cached somewhere, while the trees.config did not have duplicates, the issue still appeared in the backoffice after upgrade.

I replicated it simply by adding a definition in the trees.config twice. You then see the item in the tree twice. If you then open said item, switch to a different section and come back to the section with the open tree, the tree leaf's name gets duplicated like in the screenshot (PackagesPackages).

If you do not have duplicate definitions in your trees.config then I believe a simple recycle of the app pool should to be enough (easily tested: add a space to the global.asax and save it).

A possible fix/workaround could be in ApplicationTree.cs line 398 - Check if in the current section (applicationAlias), the same type already exists and then don't add that to the list again (so the combination: developer and umbraco.loadPackages can only exist once in the tree being built).

However, I will need Shannon's input to verify that this is the way to go.

var applicationAlias = addElement.Attribute("application").Value; var type = addElement.Attribute("type").Value;

                        if (list.Any(tree => tree.ApplicationAlias == applicationAlias && tree.Type == type) == false)
                            list.Add(new ApplicationTree(
                                             addElement.Attribute("silent") != null ? Convert.ToBoolean(addElement.Attribute("silent").Value) : false,
                                             addElement.Attribute("initialize") != null ? Convert.ToBoolean(addElement.Attribute("initialize").Value) : true,
                                             addElement.Attribute("sortOrder") != null ? Convert.ToByte(addElement.Attribute("sortOrder").Value) : (byte)0,
                                             (string)addElement.Attribute("assembly"), //this could be empty: http://issues.umbraco.org/issue/U4-1360
                                             addElement.Attribute("action") != null ? addElement.Attribute("action").Value : ""));

Arie 28 Jan 2013, 01:01:08

I'm pretty sure that I restarted the app pool manually. In addition, I always change the SSL-settings in the web.config since the install fails when it's enabled - so that also would result in a restart.

The trees.config file did not contain any duplicates, by the way.

Sebastiaan Janssen 28 Jan 2013, 07:49:18

@Arie are you still seeing the duplicates now or did you roll back? Which version were you coming from by the way? They might be remnants of when we still stored the trees in the database. I believe that changed in 4.9.0 but I'd have to check to make sure.

Arie 28 Jan 2013, 13:14:12

@Sebastiaan - I upgraded from 4.11.3. Not sure what version originally was installed before upgrading to 4.11.3, though. The problem was resolved when I copied the trees.config from the package again, though. Strangely, aside from some blank lines the versions were identical.

Sebastiaan Janssen 28 Jan 2013, 13:24:17

@Arie thanks! I have seen it before just can't reproduce. I know with the above change that it will not happen again, just waiting to see if Shannon has anything to add before I implement this.

Shannon Deminick 28 Jan 2013, 13:25:10

@Seb, just looking in to it now

Shannon Deminick 28 Jan 2013, 13:37:59

I've just pushed the fix for this. @Seb your fix is a good one! I've modified it a little bit because we need to check for the 'assembly' attribute too since some trees may be registered with that (even though it is legacy). I've also change the string comparison to invariant. All done in rev: fb60b14cc2d3 I've also added a check in the ApplicationTreeRegistrar to not continue if the database is not ready. This will probably all change to use IApplicationEventHandler once this issue is resolved: http://issues.umbraco.org/issue/U4-1546

Jason Prothero 29 May 2013, 18:59:16

If I'm seeing duplicate folders in 6.0.5 after upgrading, is there anything I can do?

Morten Christensen 30 May 2013, 07:29:21

@Jason this type of error usually occurs when there are duplicate entries in trees.config. Check that the Package tree only appears once and ensure that you probably clear cache after the upgrade (issreset etc.).

Jason Prothero 30 May 2013, 21:06:57

I'm recycling the app pool and stopped/started the website. Do I need to reset the entire IIS?

Of note, this is an upgrade that has gone from 3.0 -> 4.0.3 -> 4.5.2 -> 4.7.2 -> 4.11.8 -> 6.0.5.

Here's my trees.config. Anything look odd?


Sebastiaan Janssen 31 May 2013, 08:52:05

@Jason Looks good, would love to get a copy of the site + db if possible so I can do some debugging on it. Had a few more reports of duplicate trees. You can either attach a zip to this issue here and set visibility to just the HQ or you can mail me a link (not a file, gmail rejects large files) dropbox, google drive, etc. Of course all information will be treated with confidentiality. Thanks in advance!

Priority: Show-stopper

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal


Backwards Compatible: False

Fix Submitted:

Affected versions: 6.0.0

Due in version: 6.0.0


Story Points: