Error after upgrade - Cannot bind source type System.String to model type Umbraco.Core.Models.IPublishedContent.
Hi,
I've just upgraded an Umbraco instance from 7.3.4 to 7.5.4 via a NuGet package. After running through the installation process, I'm getting the following error:
Cannot bind source type System.String to model type Umbraco.Core.Models.IPublishedContent.
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 Umbraco.Core.Models.IPublishedContent.
Source Error:
Line 41: <div id="masterId">
Line 42: @Html.AntiForgeryToken()
Line 43: @Html.Action("RenderHeader", "HeaderSurface", new {content = Model.Content})
Line 44: @Html.Partial("ContactusModal")
Line 45: @Html.Partial("SubscribeModal")
If I take out line 43, I get the page rendering correctly (albeit without the header, of course).
The function called at line 43 is as follows:
public ActionResult RenderHeader(IPublishedContent content, string view = "WebHeaderBase.cshtml")
{
var originalModel = new RenderModel(content);
var headerModel = new WebHeaderModel(originalModel);
return View(String.Format("~/Views/Partials/{0}",view), headerModel);
}
My question is, what could be the problem here? I've tried just returning an new ViewResult and the same error persists. This all worked perfectly fine in the previous versions of Umbraco we were using - is there something obvious I'm missing?
Error after upgrade - Cannot bind source type System.String to model type Umbraco.Core.Models.IPublishedContent.
Hi,
I've just upgraded an Umbraco instance from 7.3.4 to 7.5.4 via a NuGet package. After running through the installation process, I'm getting the following error:
If I take out line 43, I get the page rendering correctly (albeit without the header, of course).
The function called at line 43 is as follows:
My question is, what could be the problem here? I've tried just returning an new ViewResult and the same error persists. This all worked perfectly fine in the previous versions of Umbraco we were using - is there something obvious I'm missing?
Thanks,
Aaron
is working on a reply...