Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nathan Doak 5 posts 87 karma points
    Jan 24, 2015 @ 01:55
    Nathan Doak
    0

    404 error when trying to open a menu in custom back office section

    Umbraco version: 7.2.1
    Asp.net version: 4.5.1
    Windows: Server 2012
    IIS: 8.0

    I've been trying to create a custom back office area I've followed this guild and this solution, however every time I click the elipses next to any of the nodes in the tree I recieve a 404 error.

     

    Request error:
    The URL returned a 404 (not found):/umbraco/backoffice/ESIBackOffice/BackOfficeTree/GetMenu

    My application definition looks like this

    namespace esi_back_office
    {
        [Application("ESIBackOffice""Back Office""icon-satellite-dish", 15)]
        public class BackOfficeApplication : IApplication { }
    }

    My Tree controller looks like this

    namespace esi_back_office.Controllers
    {
        [PluginController("ESIBackOffice")]
        [Tree("ESIBackOffice""ESIBackOfficeTree""Functions")]
        class BackOfficeTreeController : TreeController
        {
            protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
            {
                var nodes = new TreeNodeCollection();
    
                nodes.Add(CreateTreeNode("reports", id, queryStrings, "Reporting""icon-user"false));
                nodes.Add(CreateTreeNode("classes", id, queryStrings, "Classes""icon-school"false));
    
                return nodes;
            }
    
            protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)
            {
                var menu = new MenuItemCollection();
    
                if (id == Constants.System.Root.ToInvariantString())
                {
                    menu.Items.Add<CreateChildEntityActionNew>(ui.Text("actions"ActionNew.Instance.Alias));
                }
                else
                {
                    menu.Items.Add<ActionDelete>(ui.Text("actions"ActionDelete.Instance.Alias));
                }
    
                return menu;
            }
        }
    }

    And the filesystem inside of App_Plugins is

    • ESIBackOffice\backoffice\ESIBackOfficeTree\
      • create.htm
      • edit.htm

    At this point I don't know what I don't know. From the aforementioned guildes I think this shoudn't be happening but again I don't know what I don't know about this problem.

  • Nathan Doak 5 posts 87 karma points
    Jan 27, 2015 @ 20:09
    Nathan Doak
    0

    I've continued to poke around at this problem. Presently I can see that in my project the GetMenuForNode function is not being called when clicking the menu button on the custom nodes. However, in the linked example this function is being called.

    I am now looking at getting 7.2.1's source code to hopefully continue tracing the problem back. However, if anyone has some insight that would be appreciated.

  • Nathan Doak 5 posts 87 karma points
    Jan 28, 2015 @ 00:43
    Nathan Doak
    102

    Ok, found the problem, make your tree controllers public.

Please Sign in or register to post replies

Write your reply to:

Draft