U4-3675 - [NonAction] attribute should be ignored by Umbraco RenderActionInvoker

Created by Sebastiaan Janssen 22 Nov 2013, 11:20:33 Updated by Shannon Deminick 18 Mar 2014, 03:26:44

See: http://our.umbraco.org/forum/developers/extending-umbraco/46357-Ambiguous-match-found-using-T4MVC,-Umbraco-6-and-hijacking-routes

Comments

Kieron McIntyre 22 Nov 2013, 11:26:46

I thought changing the following line in RenderActionInvoker.cs:

return new ReflectedActionDescriptor(controllerContext.Controller.GetType().GetMethod("Index"), "Index", controllerDescriptor);

to something like:

return new ReflectedActionDescriptor(controllerContext.Controller.GetType().GetMethods().First(x => x.Name == "Index" && !x.GetCustomAttributes(typeof (NonActionAttribute), false).Any()))

might work.


Priority: Normal

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted: Inline code

Affected versions: 6.1.6

Due in version: 7.1.0, 6.2.0

Sprint:

Story Points:

Cycle: