Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simon 692 posts 1068 karma points
    Jul 27, 2016 @ 10:25
    Simon
    0

    Cannot bind source type System.String to model type Merchello.Web.Models.VirtualContent.IProductContent.

    Hi guys,

    I am trying to install Merchello (latest version) on fresh umbraco installation (7.4.1).

    After installed, both Merchello and FastTrack, the following error is being thrown when accessing the store:

    Cannot bind source type System.String to model type Merchello.Web.Models.VirtualContent.IProductContent.
    
    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: Umbraco.Web.Mvc.ModelBindingException: Cannot bind source type System.String to model type Merchello.Web.Models.VirtualContent.IProductContent.
    
    Source Error: 
    
    
    Line 110:
    Line 111:            // fail
    Line 112:            throw new ModelBindingException(string.Format("Cannot bind source type {0} to model type {1}.",
    Line 113:                sourceType, modelType));
    Line 114:        }
    
    Source File: C:\Users\Dev5\Downloads\Umbraco-CMS-release-7.4.1\src\Umbraco.Web\Mvc\RenderModelBinder.cs    Line: 112 
    
    Stack Trace: 
    
    
    [ModelBindingException: Cannot bind source type System.String to model type Merchello.Web.Models.VirtualContent.IProductContent.]
       Umbraco.Web.Mvc.RenderModelBinder.BindModel(Object source, Type modelType, CultureInfo culture) in C:\Users\Dev5\Downloads\Umbraco-CMS-release-7.4.1\src\Umbraco.Web\Mvc\RenderModelBinder.cs:112
       Umbraco.Web.Mvc.RenderModelBinder.BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) in C:\Users\Dev5\Downloads\Umbraco-CMS-release-7.4.1\src\Umbraco.Web\Mvc\RenderModelBinder.cs:36
       System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor) +554
       System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext controllerContext, ActionDescriptor actionDescriptor) +200
       System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__19(AsyncCallback asyncCallback, Object asyncState) +1698
       System.Web.Mvc.Async.WrappedAsyncResult`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +68
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +152
       System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout) +106
       System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state) +616
       System.Web.Mvc.Controller.<BeginExecuteCore>b__1c(AsyncCallback asyncCallback, Object asyncState, ExecuteCoreState innerState) +91
       System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +82
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +152
       System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object callbackState, BeginInvokeDelegate`1 beginDelegate, EndInvokeVoidDelegate`1 endDelegate, TState invokeState, Object tag, Int32 timeout, SynchronizationContext callbackSyncContext) +118
       System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +629
       System.Web.Mvc.Controller.<BeginExecute>b__14(AsyncCallback asyncCallback, Object callbackState, Controller controller) +56
       System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +74
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +152
       System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object callbackState, BeginInvokeDelegate`1 beginDelegate, EndInvokeVoidDelegate`1 endDelegate, TState invokeState, Object tag, Int32 timeout, SynchronizationContext callbackSyncContext) +149
       System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +482
       System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +59
       System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__4(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState) +98
       System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +82
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +152
       System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object callbackState, BeginInvokeDelegate`1 beginDelegate, EndInvokeVoidDelegate`1 endDelegate, TState invokeState, Object tag, Int32 timeout, SynchronizationContext callbackSyncContext) +118
       System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +484
       System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +99
       System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +59
       System.Web.Mvc.<>c__DisplayClass7.<BeginProcessRequest>b__6() +90
       System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Func`1 func) +70
       System.Web.Mvc.ServerExecuteHttpHandlerAsyncWrapper.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +175
       System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +1983
       System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage) +77
       System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +29
       System.Web.HttpServerUtilityWrapper.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +24
       System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter) +1038
       System.Web.Mvc.Html.ChildActionExtensions.Action(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues) +112
       System.Web.Mvc.Html.ChildActionExtensions.Action(HtmlHelper htmlHelper, String actionName, String controllerName, Object routeValues) +95
       ASP._Page_Views_Shared__ProductBox_cshtml.Execute() in c:\Users\Dev5\Downloads\Umbraco-CMS-release-7.4.1\src\Umbraco.Web.UI\Views\Shared\_ProductBox.cshtml:19
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +268
       System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +121
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +156
       System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +753
       System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +412
       Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) in C:\Users\Dev5\Downloads\Umbraco-CMS-release-7.4.1\src\Umbraco.Web\Mvc\ProfilingView.cs:24
       System.Web.Mvc.HtmlHelper.RenderPartialInternal(String partialViewName, ViewDataDictionary viewData, Object model, TextWriter writer, ViewEngineCollection viewEngineCollection) +502
       System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +156
       System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model) +97
       ASP._Page_Views_Store_cshtml.Execute() in c:\Users\Dev5\Downloads\Umbraco-CMS-release-7.4.1\src\Umbraco.Web.UI\Views\Store.cshtml:21
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +268
       System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +121
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +142
       System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +753
       System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +412
       Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) in C:\Users\Dev5\Downloads\Umbraco-CMS-release-7.4.1\src\Umbraco.Web\Mvc\ProfilingView.cs:24
       System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +480
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +50
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +123
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +582
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +582
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +115
       System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +321
       System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +184
       System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +53
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +140
       System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +63
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +50
       System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +45
       System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +81
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +140
       System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +63
       System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +47
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +50
       System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +50
       System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +140
       System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +63
       System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +47
       System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +50
       System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +50
       System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +45
       System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +81
       System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +140
       System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +63
       System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +47
       System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +50
       System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +49
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9744373
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
    

    Any feedback on this please?

    Kind Regards

  • Simon 692 posts 1068 karma points
    Aug 03, 2016 @ 11:15
    Simon
    0

    Any help on this please?

    Thank you

    kind Regards

  • Lee 1130 posts 3088 karma points
    Aug 04, 2016 @ 05:57
    Lee
    0

    I can't replicate this? How did you install Merchello and FastTrack? Both via our.umbraco?

    Download both package zips and install via the install package section of Umbraco. Merchello first, then FastTrack?

  • Simon 692 posts 1068 karma points
    Aug 04, 2016 @ 06:41
    Simon
    0

    Hi Lee,

    I do exactly what you said. First I installed Merchello and then Fast Track..for times.. the error occurs....

    And Umbraco was a fresh install

  • Lee 1130 posts 3088 karma points
    Aug 04, 2016 @ 07:16
    Lee
    0

    And you installed them via the umbraco packages. Not using Nuget right?

  • Simon 692 posts 1068 karma points
    Aug 04, 2016 @ 07:29
    Simon
    0

    Yes, Exactly.

  • Fabian 68 posts 172 karma points
    Sep 22, 2016 @ 14:47
    Fabian
    0

    Hi Everyone,

    I am also encountering such issue when calling the AddProductToBasketForm as follows:

    @Html.Action("AddProductToBasketForm", "Basket", new { area = "Merchello", model = Model.Content.MerchelloProduct })
    

    If I call any other action, like for example the BasketForm it works. This is due that such actions do not take any parameters.

    I am currently running umbraco version 7.4.1 and merchello and fasttrack version 2.1.0

    Please note that fast track was installed through nuget since I wanted to use it in an already existing project.

    Can anybody enlighten me about what is wrong?

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft