Copied to clipboard

Flag this post as spam?

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


  • Chris Norwood 131 posts 642 karma points
    Oct 17, 2019 @ 20:57
    Chris Norwood
    0

    Broken after 8.2 upgrade (not urgent)

    I'm not using this on a Live site (I'm just playing with Umbraco 8.2 and this seems a really cool package) so this isn't urgent, but when attempting to render content containing a rich text editor after upgrading to 8.2 the following error is occurring.

    System.NullReferenceException: Object reference not set to an instance of an object.
       at Umbraco.Web.PropertyEditors.RichTextPropertyEditor.RichTextPropertyValueEditor.FromEditor(ContentPropertyData editorValue, Object currentValue) in d:\a\1\s\src\Umbraco.Web\PropertyEditors\RichTextPropertyEditor.cs:line 117
       at Our.Umbraco.DocTypeGridEditor.Helpers.DocTypeGridEditorHelper.ConvertValue(String id, String contentTypeAlias, String dataJson)
       at Our.Umbraco.DocTypeGridEditor.Helpers.DocTypeGridEditorHelper.<>c__DisplayClass0_0.<ConvertValueToContent>b__0()
       at Umbraco.Core.Cache.AppCacheExtensions.<>c__DisplayClass5_0`1.<GetCacheItem>b__0() in d:\a\1\s\src\Umbraco.Core\Cache\AppCacheExtensions.cs:line 62
       at Umbraco.Core.Cache.FastDictionaryAppCacheBase.<>c__DisplayClass21_0.<GetSafeLazy>b__0() in d:\a\1\s\src\Umbraco.Core\Cache\FastDictionaryAppCacheBase.cs:line 285
    --- End of stack trace from previous location where exception was thrown ---
       at Umbraco.Core.Cache.HttpRequestAppCache.Get(String key, Func`1 factory) in d:\a\1\s\src\Umbraco.Core\Cache\HttpRequestAppCache.cs:line 81
       at Umbraco.Core.Cache.AppCacheExtensions.GetCacheItem[T](IAppCache provider, String cacheKey, Func`1 getCacheItem) in d:\a\1\s\src\Umbraco.Core\Cache\AppCacheExtensions.cs:line 62
       at Our.Umbraco.DocTypeGridEditor.Helpers.DocTypeGridEditorHelper.ConvertValueToContent(String id, String contentTypeAlias, String dataJson)
       at ASP._Page_app_plugins_doctypegrideditor_render_DocTypeGridEditor_cshtml.Execute() in d:\Documents\Visual Studio 2017\Projects\NDDWebsite\NDDWebsite\app_plugins\doctypegrideditor\render\DocTypeGridEditor.cshtml:line 26
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
       at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
       at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
       at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
       at Umbraco.Web.Mvc.ProfilingView.Render(ViewContext viewContext, TextWriter writer) in d:\a\1\s\src\Umbraco.Web\Mvc\ProfilingView.cs:line 25
       at System.Web.Mvc.HtmlHelper.RenderPartialInternal(String partialViewName, ViewDataDictionary viewData, Object model, TextWriter writer, ViewEngineCollection viewEngineCollection)
       at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData)
       at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model)
       at ASP._Page_Views_Partials_grid_editors_Base_cshtml.Execute() in d:\Documents\Visual Studio 2017\Projects\NDDWebsite\NDDWebsite\Views\Partials\grid\editors\Base.cshtml:line 20
    

    I drilled down as far as I could into the code and it seems this function call (in DocTypeGridEditor.cshtml) calls the method that causes the exception, but I couldn't drill down any further without the source code.

    var content = DocTypeGridEditorHelper.ConvertValueToContent(id, contentTypeAlias, value);
    

    I assume this is caused by the changes to the RTE in 8.2 - I tried adding a new document type with just an RTE and got the same results.

  • Dennis Milandt 190 posts 517 karma points
    Oct 17, 2019 @ 23:10
    Dennis Milandt
    0

    I have the same issue. I think it is urgent :)

    Is it possible to provide a fix?

  • Erik Eelman 79 posts 319 karma points
    Oct 18, 2019 @ 07:36
    Erik Eelman
    1

    There is an open issue about this and there is also a temporary patch file to fix the issue: https://github.com/skttl/umbraco-doc-type-grid-editor/issues/159

    The temp fix worked for me for now :)

  • Chris Norwood 131 posts 642 karma points
    Oct 18, 2019 @ 08:52
    Chris Norwood
    0

    Thank you - that's worked :)

  • Dennis Milandt 190 posts 517 karma points
    Oct 18, 2019 @ 10:40
    Dennis Milandt
    0

    Thank you for linking to the GitHub Issue (and fix!!)

    This solved my problem for now.

Please Sign in or register to post replies

Write your reply to:

Draft