Copied to clipboard

Flag this post as spam?

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


  • Drew Mayo 27 posts 128 karma points
    Jun 03, 2016 @ 15:35
    Drew Mayo
    0

    Umbraco Forms won't reload macros after postback

    All I installed Umbraco Forms to my Umbraco 7.2.4 project using the version released yesterday June 2 and I'm running into a couple of issues:

    • RenderUmbracoFormScripts.cshtml was missing the parameter of recordId when calling the Render method of the UmbracoForms controller. Easy enough to fix, but I thought I would call it out.

    The issue I haven't figured out is that I get the error "Error loading Partial View script (file: ~/Views/MacroPartials/InsertUmbracoForm.cshtml)" after the post back of a form (actually both macros won't load). I can see the form when the page loads, submit it, see the record created in the back end, yet the macros won't load afterward. The only setting I changed was to add mode="form" in InsertUmbracoForm.cshtml.

    I've tried setting break points on where the macros are called. The breakpoints are hit when the pages initially loads, but not after the postback. I tried creating the simplest of form with little else (no route hijacking, no master page, etc) and I had the same result. I also used @Umbraco.RenderMacro("FormsRenderForm", new { FormGuid = "my forms guid" }) to isolate off everything else.

    Anyway I could use a point in the right direction. Thanks in advance,

    Drew

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Jun 05, 2016 @ 08:02
    Sebastiaan Janssen
    0

    You can debug this better by going into ~/Config/UmbracoSettings.config and setting MacroErrors to throw instead of inline. That way you can see what the real error is.

  • Drew Mayo 27 posts 128 karma points
    Jun 06, 2016 @ 15:17
    Drew Mayo
    0

    Thanks Sebastiaan. I changed the MacroErrors setting to throw to get the real error. It's in the screen shot below (the file paths are slightly edited to remove sensitive words):

    enter image description here

    I've seen this error a handful of times in the past in other code bases, but I don't have the source to Forms. Any help is definitely appreciated,

    Drew

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Jun 06, 2016 @ 16:17
    Sebastiaan Janssen
    0

    Ah unfortunately that's actually a bug that was fixed in 7.3.0 and later, there's not much I can do for you there but recommed you upgrade. And if you're doing that anyway I wholeheartedly recommend you go straight to 7.4.3. :)

    This is the bug: http://issues.umbraco.org/issue/U4-6721

    By the way, we're aware of the recordId parameter missing in Forms, an update will be out soon to fix that, thanks. :)

  • Drew Mayo 27 posts 128 karma points
    Jun 07, 2016 @ 19:50
    Drew Mayo
    0

    Thanks Sebastiaan, we know we need to get upgraded to a more current version, and this is probably the push we needed to do so. Thanks for the help.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies