erichexter / twitter.bootstrap.mvc

nuget package to make bootstrap easy with mvc4
Apache License 2.0
248 stars 134 forks source link

Bug in NavigationRouteConfigurationExtensions #75

Open nwoolls opened 11 years ago

nwoolls commented 11 years ago

Since the source for the NavigationRoutes stuff is no longer in the repo I cannot check to see if this is fixed, but it looks like it was still an issue when the code was moved into its own package and it's still an issue with the NuGet packages.

With the current code, if you have other actions under the Home controller besides Index, their links will be rendered incorrectly in the navigation bar and will generate a 404. For instance, instead of http://localhost/home/test the URL is http://localhost/test. This is pretty easy to reproduce with the sample project by adding another action to the Home controller, with a View, and then registering that with the navigation routes.

Commenting out the else condition in NavigationRouteConfigurationExtensions.CreateUrl(string actionName, string controllerName) fixes this problem.

RhysC commented 11 years ago

Bump. The "Commenting out the else condition" fix looks good too.