[5.3.17] Issue with a view Rendering and the RenderingModel Sitecore class
See original GitHub issueLast week I had an issue : https://github.com/mikeedwards83/Glass.Mapper/issues/371 and your last version fixed it.
Unfortunately your last version give me an error related to the LazyObjectInterceptor if I inspect my stacktrace.
[NullReferenceException]
Castle.Proxies.RenderingModelProxy.get_Item_callback() +16
Castle.Proxies.Invocations.RenderingModel_get_Item.InvokeMethodOnTarget() +39
Castle.DynamicProxy.AbstractInvocation.Proceed() +109
Glass.Mapper.Pipelines.ObjectConstruction.Tasks.CreateConcrete.LazyObjectInterceptor.Intercept(IInvocation invocation) in C:\TeamCity\buildAgent\work\9693a2d38f55a4a\Source\Glass.Mapper\Pipelines\ObjectConstruction\Tasks\CreateConcrete\LazyObjectInterceptor.cs:107
Castle.DynamicProxy.AbstractInvocation.Proceed() +443
Castle.Proxies.RenderingModelProxy.get_Item() +163
ASP._Page_Views_Shared__BlocContenuFondGrisAvecCoinBouton_cshtml.Execute() in C:\Inetpub\wwwroot\IA\Website\Views\Shared\_BlocContenuFondGrisAvecCoinBouton.cshtml:10
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +251
System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +147
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +121
System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +135
Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +314
[InvalidOperationException: Error while rendering view: '/Views/Shared/_myView.cshtml' (model: 'Castle.Proxies.RenderingModelProxy, DynamicProxyGenAssembly2').
]
Model.Item (of type RenderingModel) throw an exception in my view.
This was not the case with the version 5.3.15.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Sitecore MVC : Error while rendering view
The problem occurs most likely when your rendering parameters template does not inherit from the default rendering parameters template that defines fields ...
Read more >- Errors in logs - ViewRenderings expects RenderingModel ...
Hello,. Recently I came across issue on prod system, My logs there contains errors as below: 4020 16:03:27 ERROR Application error. Exception: System.Web....
Read more >Releases
5.3.17. ISSUE 370 The lazy object inceptor will now ignore class ... the view requires a Glass model but is passed the Sitecore...
Read more >Rendering Model differences in Sitecore 8.2 vs 9.1
In Sitecore 9.1.1, this exact same view and rendering definition item create an unhandled exception: The model item passed into the dictionary ...
Read more >View Rendering Error - mvc
I am stuck in one issue. While browsing to a new sitecore item created like http://sc92/newpage I am getting the below error. Error...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In release 5.4.21
Hi,
I have pushed a fix into the develop branch. I will create a release later today to fix this issue.
Thanks
Mike