Copied to clipboard

Flag this post as spam?

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


  • Damien Holley 180 posts 541 karma points
    May 22, 2019 @ 00:06
    Damien Holley
    0

    Backoffice Settings (member types) using plugin route instead of default Umbraco route for a view

    Hi, I'm getting the log error:

    System.Exception: No physical template file was found for template GetModelsOutOfDateStatus 
    

    looking at the js error I get:

    Failed to load resource: the server http://localhost:3503/umbraco/backoffice/abrioffice/ModelsBuilderBackOffice/GetModelsOutOfDateStatus responded with a status of 500 (Internal Server Error)
    

    So Umbraco is routing to my plugin area for the modelsbuilder area.

    Here is my route declaration:

    RouteTable.Routes.MapRoute("abrioffice",
                              _globalSettings.GetUmbracoMvcArea() + "/backoffice/abrioffice/{controller}/{action}/{id}",
                              new {
                                  controller = "ABRIOffice",
                                  action = "Index",
                                  id = UrlParameter.Optional });
    

    Any help appreciated.

  • Damien Holley 180 posts 541 karma points
    May 22, 2019 @ 09:04
    Damien Holley
    100

    Ok so I used a constraint to fix this, limiting the route to only be used by my controller. This means now ModelsBuilder doesn't try to use it.

    RouteTable.Routes.MapRoute("ABRIOffice",
                                       _globalSettings.GetUmbracoMvcArea() + "/backoffice/abrioffice/{controller}/{action}/{id}",
                                       new {
                                           controller = "abri",
                                           action = "Index",
                                           id = UrlParameter.Optional
                                       },
                                       constraints: new { controller="ABRIOffice" });
    
Please Sign in or register to post replies

Write your reply to:

Draft