hijack controller not routing when parent is also a hijack
HI all,
I have the following tree
- Account - Reset
Both have implement a Hijack controller. My issue is that when ever Reset is the child of Account the account controller is always called. When Reset is not a child of account the controller is called correctly. ie the following tree works.
I should point out. I'm on version 6.20 ( just relised i'm in the umbraco 7 forum )
Here are my controllers. Please note both hijack controllers work when there is no parent hijack. ie when Reset is a child of Account it reverts to the Account controller.
public class PortalAccountController : Umbraco.Web.Mvc.RenderMvcController
{
public PortalAccountController()
{
}
public override ActionResult Index(RenderModel model)
{
return View(model);
}
}
public class PortalResetController : Umbraco.Web.Mvc.RenderMvcController
{
public PortalResetController()
{
}
public override ActionResult Index(RenderModel model)
{
return View(model);
}
}
Hmm route hijacking should happens based on the documenttype name (controller name) and template name (ActionResult name). It should not be related to parents so it's very strange.
hijack controller not routing when parent is also a hijack
HI all,
I have the following tree
- Account
- Reset
Both have implement a Hijack controller. My issue is that when ever Reset is the child of Account the account controller is always called. When Reset is not a child of account the controller is called correctly. ie the following tree works.
- Account
- Reset
Am i missing a trick here?
Hello,
Could you post the code of your controllers?
Jeroen
I should point out. I'm on version 6.20 ( just relised i'm in the umbraco 7 forum )
Here are my controllers. Please note both hijack controllers work when there is no parent hijack. ie when Reset is a child of Account it reverts to the Account controller.
Hmm route hijacking should happens based on the documenttype name (controller name) and template name (ActionResult name). It should not be related to parents so it's very strange.
Jeroen
Hi Jereon, really appreciate the sanity check. Which got me thinking maybe there was some other race conditon at play here.
Turns out i had an over extending Url rewritting rule. Thanks again.
is working on a reply...