We have moved to GitHub Issues
Created by Shannon Deminick 04 Nov 2013, 22:31:25 Updated by Per Ploug 04 Nov 2013, 23:25:17
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.
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.
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.
Issue created: http://issues.umbraco.org/issue/U4-3318
Assignee: Per Ploug
Backwards Compatible: True
Due in version: 7.0.0