U4-3315 - A few of the new 'options' context menu items don't work

Created by Shannon Deminick 04 Nov 2013, 22:31:25 Updated by Per Ploug 04 Nov 2013, 23:25:17






  • results in No childNodesUrl property found on the tree node, cannot load child nodes


Shannon Deminick 04 Nov 2013, 23:16:54

Unfortunately this is not going to be very easy/nice to fix. The problem is that you are passing in a Content display model to the executeMenuItem which is expecting a tree node model. It must be a tree node model because it needs to traverse up the tree to get the current tree alias and it is expecting a tree node model.

I think it's also by pure fluke that the umbContextMenu.executeMenuItem is even executing for the options menu on the content item since the markup in the edit.html for the content editor is:


but executeMenuItem doesn't actually exist on the Umbraco.Editors.Content.EditController controller and the controller isn't referencing the umbContextMenu directive - so don't really think that method actually be called there.

In order to make this menu work we need to make a request to go get the actual tree node model for this node, then use that model to go get the menu.

Shannon Deminick 04 Nov 2013, 23:18:21

The fix you pushed up will only work if that editor was loaded after click on the tree node - But I am able to load that editor in via a route without clicking on a tree node.

Per Ploug 04 Nov 2013, 23:22:07

Yeah, this is the best solution I can come up with atm, it is temporary, there are better ways of dealing with this, but also ways that take more time then we have for the RC. Will setup a task to refactor this after the RC.

If you load the editor via a route, it will still sync the tree and set the node tho, but not ideal

The reason it works is because by accident the editor have access to the scope where the original executeMenu method is defined.

Per Ploug 04 Nov 2013, 23:25:17

Issue created: http://issues.umbraco.org/issue/U4-3318

Priority: Normal

Type: Bug

State: Fixed

Assignee: Per Ploug

Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 7.0.0


Story Points: