Problem with similarly named actions

Apr 28, 2010 at 9:12 PM

Ok, so I've been seeing different things as the code evolves to 2.0. I'm on the latest (as of 4/28/2010) codebase, and I've been seeing some odd behavior when you have two or more actions that are named similarly.

In this case, I have a Controller, Discipline, and two actions, Edit and EditCourses. When I have the below

      <mvcSiteMapNode title="Edit Profile" controller="Account" action="EditProfile" isDynamic="true" dynamicParameters="*" />
      <mvcSiteMapNode title="Disciplines" controller="Discipline" action="Index">
        <mvcSiteMapNode title="Edit Discipline" controller="Discipline" action="Edit" isDynamic="true" dynamicParameters="*" />
        <mvcSiteMapNode title="Edit Discipline Courses" controller="Discipline" action="EditCourses" isDynamic="true" dynamicParameters="*" />
        <mvcSiteMapNode title="Create Discipline" controller="Discipline" action="Create" />
      </mvcSiteMapNode>

Both pages will display the EditProfile node in the SiteMapPath helper (Note: It actually displays WHATEVER the FIRST NON-CONTAINER node is). If I remove one or the other, the other one will work.

Since it looks like if a node is missing, it is simply displaying the first non-container node it can find (A "feature" that I think is really a bug), I believe this means that if both are there, it can't find either one, which makes it seem as if it's doing some sort of RegEx match or partial matching, etc. that is getting confused because of the names of those nodes.

So I see two bugs:

1. Non-existing nodes are getting assigned the first non-container node value (Should just display nothing, or as far up the tree as it can go, etc.?)

2. Similarly named nodes are acting funky, as above.

 

Should I submit these as issues?