Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hi,
What is the code (or at least the constructor) of your CheckoutController? Mind sharing it here?
I had nothing to do with it actually. I was another component that was initiated in the constuctor that needed payment settings that not all configurations had. We added a meta field at the at the same time, there for we thought it had to do with that.
/Kristoffer
Hi!
After adding a metafield to the Commerce object Cart Order Class and Purchase Order we no longer can load the CheckoutController without exception:
Server Error in '/' Application. No parameterless constructor defined for this object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.MissingMethodException: No parameterless constructor defined for this object. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [MissingMethodException: No parameterless constructor defined for this object.] System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0 System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +197 System.Activator.CreateInstance(Type type, Boolean nonPublic) +114 System.Activator.CreateInstance(Type type) +11 System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +72 [InvalidOperationException: An error occurred when trying to create a controller of type 'Designonline.Site.Features.Checkout.Controllers.CheckoutController'. Make sure that the controller has a parameterless public constructor.] System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +239 System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +103 System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +293 System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +104 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1939 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +2622 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +973
We ha rebuilt and restarted several times without luck, what are we missing?
We are using Commerce 10.7 built on QuickSilver.
Thanks!
/Kristoffer