Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Edgar Rasquin 326 posts 925 karma points
    Aug 06, 2018 @ 13:52
    Edgar Rasquin
    0

    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: enter image description here

    Frontend: enter image description here

    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.

    Can anyone help please?

  • Søren Gregersen 441 posts 1884 karma points MVP 2x c-trib
    Aug 06, 2018 @ 15:23
    Søren Gregersen
    100

    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.

  • Edgar Rasquin 326 posts 925 karma points
    Aug 07, 2018 @ 07:29
    Edgar Rasquin
    1

    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.

Please Sign in or register to post replies

Write your reply to:

Draft