I've got the following problem. In my backend grid editor I have 3 entries but when I try to render it in web I get errors in 2 of them:
Backend:
Frontend:
Here is the error:
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei Umbraco.Web.PublishedContentExtensions.GetPropertyValue[T](IPublishedContent content, String alias)
bei ASP.PageViewsPartialsgrideditorsmediacshtml.Execute() in ...\Views\Partials\grid\editors\media.cshtml:Zeile 24.
bei System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
bei System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
bei System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
bei System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
bei System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
bei Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer)
bei System.Web.Mvc.HtmlHelper.RenderPartialInternal(String partialViewName, ViewDataDictionary viewData, Object model, TextWriter writer, ViewEngineCollection viewEngineCollection)
bei System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData)
bei System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model)
bei ASP.PageViewsPartialsgrideditorsbasecshtml.Execute() in ...\Views\Partials\grid\editors\base.cshtml:Zeile 21.
Grid Editor Problem
Hi there,
I've got the following problem. In my backend grid editor I have 3 entries but when I try to render it in web I get errors in 2 of them:
Backend:
Frontend:
Here is the error:
Can anyone help please?
hi Edgar,
are you able to share your view? Obviously something is missing - either you need to republish the media, or something similar.
Line 24 in media.cshtml is the culprit here.
Hi Søren,
thanks for your reply. You were absolutely right. I was not catching the null reference in the code. Sloppy coding :( Everything is sorted now.
Thanks again and have a nice day.
is working on a reply...