MvcSiteMapProvider icon indicating copy to clipboard operation
MvcSiteMapProvider copied to clipboard

Mutiple AttributeRoutes with different verbs not resolving breadcrumb

Open martinjt opened this issue 7 years ago • 0 comments

It's a bit of a weird setup, possibly, so don't know if this is actually a bug or not.

I have

[HttpDelete]
[Route("{id:int}/provider/{providerId:int?}", Order = 3)]
public async Task<ActionResult> DeleteProvider(int id, int? providerId)
{
..
}

Then

[Route("{id:int}/provider/{providerId:int}", Order = 1)]
[MvcSiteMapNode(Title = "Edit Provider", ParentKey = "listProviders", Key = "EditProvider", ResourceKey = "<key>", PreservedRouteParameters = "id,providerId")]
		public async Task<ActionResult> EditProvider(int id, int providerId)
{
..
}

This doesn't resolve the breadcrumb when doing:

@Html.SiteMapPath()

However, if I remove the HttpDelete method entirely, it works fine.

Like I said, probably an obscure usecase, happy to try and build a small repo, but putting this here initially to see if it's a known issue.

martinjt avatar May 22 '17 16:05 martinjt