Copied to clipboard

Flag this post as spam?

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


  • Nathan Woulfe 447 posts 1664 karma points MVP 5x hq c-trib
    Sep 03, 2016 @ 05:31
    Nathan Woulfe
    0

    Noticed an error in my logs which I can't make sense of...

    2016-09-03 00:06:27,929 [P9484/D2/T21] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
    System.ArgumentNullException: Value cannot be null.
    Parameter name: child
    at System.Web.UI.ControlCollection.Add(Control child)
    at Umbraco.Web.UmbracoComponentRenderer.RenderMacro(macro m, IDictionary`2 parameters, page umbracoPage)
    at Umbraco.Web.UmbracoComponentRenderer.RenderMacro(String alias, IDictionary`2 parameters, page umbracoPage)
    at Umbraco.Web.UmbracoComponentRenderer.RenderMacro(String alias, IDictionary`2 parameters)
    at Umbraco.Web.PropertyEditors.ValueConverters.RteMacroRenderingValueConverter.<>c__DisplayClass7.<RenderRteMacros>b__1(String macroAlias, Dictionary`2 macroAttributes)
    at Umbraco.Core.Macros.MacroTagParser.ParseMacros(String text, Action`1 textFoundCallback, Action`2 macroFoundCallback)
    at Umbraco.Web.PropertyEditors.ValueConverters.RteMacroRenderingValueConverter.RenderRteMacros(String source, Boolean preview)
    at Umbraco.Web.PropertyEditors.ValueConverters.RteMacroRenderingValueConverter.ConvertDataToSource(PublishedPropertyType propertyType, Object source, Boolean preview)
    at Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedProperty.get_Value()
    at Umbraco.Web.Models.DynamicPublishedContent.TryGetUserProperty(GetMemberBinder binder)
    at Umbraco.Web.Models.DynamicPublishedContent.<>c__DisplayClass9.<TryGetMember>b__6(Func`2 m)
    at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
    at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
    at Umbraco.Web.Models.DynamicPublishedContent.TryGetMember(GetMemberBinder binder, Object& result)
    at CallSite.Target(Closure , CallSite , Object )
    at ASP._Page_Views_ContentPageForm_cshtml.Execute() in path\to\my\view.cshtml:line 7
    

    Bit that's bothering me is the view is simple:

    7: @CurrentPage.bodyText
    8: @Html.Partial("BreakoutBox")
    

    Some of the references in the trace make me think it's actually related to rendering a form in an RTE, which is happening in the BreakoutBox partial. The page, and form, however render fine.

    Any insight would be great.

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    Sep 04, 2016 @ 08:04
    Sebastiaan Janssen
    0

    Is your form in the bodyText of the current page or in the BreakoutBox?

    Either way, there seems to be something wrong with the macroControl being add to the containerPage: https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Web/UmbracoComponentRenderer.cs#L169

    It could be any number of things in this method above it though:

    var macroControl = m.renderMacro(macroProps,
                    umbracoPage.Elements,
                    _umbracoContext.PageId.Value);
    

    This renderMacro method is huge so who knows what might be going wrong there.

    Anyway, easiest way to figure out (without having to guess) is to spin up a copy of the umbraco source and set a breakpoint.

  • Nathan Woulfe 447 posts 1664 karma points MVP 5x hq c-trib
    Sep 04, 2016 @ 23:57
    Nathan Woulfe
    0

    Thanks Seb

    Form is in the breakout box RTE. Runs fine, despite raising the error, and is only happening in prod rather than my local development site, which makes stepping into the source locally potentially a futile exercise.

    Only noticed the error after upgrading from 6.0.2 to 7.5.2, might start by creating a new form and seeing if that has the same issue...

  • Nathan Woulfe 447 posts 1664 karma points MVP 5x hq c-trib
    Sep 05, 2016 @ 08:03
    Nathan Woulfe
    0

    Derp. My fault - had a form macro with no form guid...

Please Sign in or register to post replies

Write your reply to:

Draft