We have recently upgraded our application from Glass mapper v3 to v.4.0.9.60 and facing this error 'Page editing error. Could not find property on type System.Object' on all properties in Edit mode. It works fine in live mode or preview mode. Here are the details of our Glass mapper implementation:
Domain classes:
[SitecoreType(TemplateId = "{XXXXX}", AutoMap = true)]
public interface CompanyInformationPage : BasePage {
string CompanyName { get; set; }
}
[SitecoreType(TemplateId = "{XXXXX}", AutoMap = true)]
public interface BasePage : ISitecoreItem
{
string Title { get; set; }
string Description { get; set; }
string Summary { get; set; }
Image Image { get; set; }
}
View:
@inherits Glass.Mapper.Sc.Web.Mvc.GlassView<CompanyInformationPage>
<div class="company_page">
<h1>@Editable(Model, x=>x.Title)</h1>
@Html.Raw(@Editable(Model, x => x.Description))
</div>
We have tried removing GlassView as mentioned under http://glass.lu/Blog/GlassV4 (MVC Improvements) section but it didn't fix this issue. We have also tried enabling z.Glass.Mapper.Sc.ViewRender.config.exclude file as per #198 but this also didn't work. We just renamed this file and removed '.exclude' extension and didn't make any changes in GlassMapperScCustom.cs file. Are we missing anything here?
Please advise.
Thank you!