I just upgraded to 7.4 today from 7.2 (using nuget) and I'm getting the following error (code worked fine in 7.2):
Cannot bind source content type Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedContent to model type Models.Auth.LoginModel
Umbraco.Web.Mvc.RenderModelBinder.BindModel(Object source, Type modelType, CultureInfo culture) +551
Heres my Model:
public class LoginModel : Umbraco.Core.Models.PublishedContent.PublishedContentModel
{
public LoginModel() : this(new UmbracoHelper(UmbracoContext.Current).TypedContent(UmbracoContext.Current.PageId)) { }
public LoginModel(IPublishedContent content) : base(content) { }
[Required]
[MaxLength(100)]
public string Email { get; set; }
[Required]
[MaxLength(100)]
public string Password { get; set; }
[MaxLength(500)]
public string RedirectUrl { get; set; }
}
and Its a regular post on my auth surface controller:
[HttpPost]
public ActionResult HandleLogin(Models.Auth.LoginModel loginModel)
Any advice? Does this method for building models still work in 7.4, or should I be trying out the new Models Builder?
Noticed there is an updated DLL in another thread, I'll give that a try too.
7.4 surface controller models broke
I just upgraded to 7.4 today from 7.2 (using nuget) and I'm getting the following error (code worked fine in 7.2):
Heres my Model:
and Its a regular post on my auth surface controller:
Any advice? Does this method for building models still work in 7.4, or should I be trying out the new Models Builder?
Noticed there is an updated DLL in another thread, I'll give that a try too.
Hello,
The model binder in Umbraco had a few updates in Umbraco 7.4. Maybe it's related to that: http://issues.umbraco.org/issue/U4-7754#comment=67-25489
Jeroen
I just noticed that this is broken when posting to normal RenderMvcController's too. WTF happened in 7.4 to break this? :P
7.4.1 didnt fix it at least. Pretty frustrating. Cant see anything in the patch notes or breaking changes about it.
is working on a reply...