U4-2854 - Legacy links to UmbClientMgr.contentFrame

Created by Markus Johansson 16 Sep 2013, 12:09:53 Updated by Per Ploug 01 Oct 2013, 09:40:13

When working in a custom tree the custom items in the tree i implemented using the "BaseTree"-class:

public class loadSettings : BaseTree

This solution used to work in v4 & v6 and basicly loads the "/umbraco/NewsletterStudio/Pages/Settings.aspx"-file in the contentFrame aread.

In version 7 this doesn't work, and nothing happens when clicking on the node.

Here is the code:

protected override void CreateRootNode(ref XmlTreeNode rootNode) {

rootNode.NodeID = "rootSettings"; rootNode.NodeType = "newsletterstudio_settings";

rootNode.Icon = "settingMasterDatatype.gif"; rootNode.OpenIcon = "settingMasterDatatype.gif"; rootNode.Action = string.Format("javascript:UmbClientMgr.contentFrame('/umbraco/NewsletterStudio/Pages/Settings.aspx');");


// Removes the small "open folder" icon rootNode.Source = null;


I have also looked at another situation where the Action is on one of the child nodes, this works just fine:

public override void Render(ref XmlTree tree) {

        ContextFacade container = ContextFactory.GetInstance();

        foreach (var subscription in container.Subscriptions)
            XmlTreeNode node = XmlTreeNode.Create(this);
            node.Text = subscription.Name;

            node.NodeType = "subscription";
            node.NodeID = subscription.UniqueID;

            node.OpenIcon = "table.png";
            node.Icon = "table.png";

            node.Action = string.Format("javascript:UmbClientMgr.contentFrame('/umbraco/NewsletterStudio/Pages/Subscription.aspx?id={0}');", subscription.Id);




Per Ploug 16 Sep 2013, 12:54:08

got some info from the chrome console? inspected the link to see the exact js attached to it?

Per Ploug 16 Sep 2013, 12:54:53

I'm pretty sure its caused by you not using a tree function but the javascript:js() syntax tho

Markus Johansson 16 Sep 2013, 14:39:27

Hi! No information in the console - it just loads the dashboard. Hmm. the child nodes generated in the "Render" method above are clickable but not the rootnode. The code is basiclly the same:

(Don't work) rootNode.Action = string.Format("javascript:UmbClientMgr.contentFrame('/umbraco/NewsletterStudio/Pages/Settings.aspx');");


(Works) node.Action = string.Format("javascript:UmbClientMgr.contentFrame('/umbraco/NewsletterStudio/Pages/Subscription.aspx?id={0}');", subscription.Id);

PS. Let me know if you need remote access to the installation.

Markus Johansson 16 Sep 2013, 14:41:37

And no the link looks looks like this in both cases: Default

Per Ploug 30 Sep 2013, 21:13:52

Ah, I needed to look at the error a couple of times to get why this didnt work. Its because you set an action on the root node of a tree, currently that action is not mapped over to the new trees, but it should, assigning this to shannon as he knows where that should happen

Per Ploug 01 Oct 2013, 09:40:08

Okey, found the problem, which is because we strip out these javascript actions on root nodes, have now removed that clause in the code, fixed up a couple of methods, and things seems to work just fine.

Priority: Normal

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 7.0.0

Due in version: 7.0.0


Story Points: