We are facing following error when overriding an Action method with same name and same Controller name in nopCommerce 4.00.
This thing is working like charm in nopCommerce 3.90..
The controller name has to be same because we cannot override view page in our plugin due to theming issue (We don't want to provide support for each theme in plugin) and in nopCommerce viewpage, this controller action name is fixed.. Basically OnePageCheckout in our case.. See error below:
An unhandled exception occurred while processing the request.
AmbiguousActionException: Multiple actions matched. The following actions matched route data and had all constraints satisfied:
Nop.Web.Controllers.CheckoutController.Index (Nop.Web)
NopAdvance.Plugin.Widgets.MYPLUGIN.Controllers.CheckoutController.Index (NopAdvance.Plugin.Widgets.MYPLUGIN)
Nop.Web.Framework.Infrastructure.Extensions.ApplicationBuilderExtensions+<>c.<UseNopExceptionHandler>b__1_1(HttpContext context) in ApplicationBuilderExtensions.cs, line 81
Stack Query Cookies Headers
AmbiguousActionException: Multiple actions matched. The following actions matched route data and had all constraints satisfied:
Nop.Web.Controllers.CheckoutController.Index (Nop.Web)
NopAdvance.Plugin.Widgets.MYPLUGIN.Controllers.CheckoutController.Index (NopAdvance.Plugin.Widgets.MYPLUGIN)
Nop.Web.Framework.Infrastructure.Extensions.ApplicationBuilderExtensions+<>c.<UseNopExceptionHandler>b__1_1(HttpContext context) in ApplicationBuilderExtensions.cs
+
throw exception;
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware+<Invoke>d__6.MoveNext()
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware+<Invoke>d__6.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7.MoveNext()
Show raw exception details
Any perfect help would be appreciated.
Thank you,
Atul