maartenba / MvcSiteMapProvider

An ASP.NET MVC SiteMapProvider implementation for the ASP.NET MVC framework.
Microsoft Public License
537 stars 220 forks source link

Getting double Id at the end of the path created by Html.MvcSiteMap() #488

Open javierxbrenes1 opened 4 years ago

javierxbrenes1 commented 4 years ago

Hey, I have this configuration

<mvcSiteMapNode title="Administration" controller="CommonSettings" action="Index">
    <mvcSiteMapNode title="Users" controller="User" action="Index">
      <mvcSiteMapNode title="User Details" controller="User" action="UserDetails" preservedRouteParameters="id"/>
      <mvcSiteMapNode title="Edit User" controller="User" action="Edit" preservedRouteParameters="id">
        <mvcSiteMapNode title="Reset Password" controller="User" action="ResetPassword" preservedRouteParameters="id"/>
      </mvcSiteMapNode>
    </mvcSiteMapNode>
</mvcSiteMap>

When I go to Reset Password page the breadcrumb created is this: Users > Edit User > Reset Password

The path under Edit User is "http://domain/User/Edit/5/5" this is not correct because the expected path has to be "http://domain/User/Edit/5"

so far, I am guessing that the problem is on the Mvc.sitemap due preservedRouteParameters but if I remove it then I can't see any breadcrumb anymore.

any idea. ?