Copied to clipboard

Flag this post as spam?

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


  • Ryan Nguyen 27 posts 80 karma points
    Apr 17, 2015 @ 18:09
    Ryan Nguyen
    0

    Unpublished Nodes causes macros error in grid layout

    Hey Everyone,

    Like the title say, I created a simple macro (Test) and adding it to the grid layout.  Everything works fine if the node has been published, however if the page is unpublished, here is the error I received.

    "Error loading Partial View script (file: ~/Views/MacroPartials/Test.cshtml)"

    Can anyone tell me how to fix the macro in the grid if the node is unpublished? Or if there is even a fix?

    Thanks

    Ryan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 17, 2015 @ 18:30
    Jan Skovgaard
    0

    Hi Ryan

    Could you have a look in the /App_Data/Logs file and see if it reveals more information about the error perhaps? I have not seen it before but unfortunately I have not been using the grid that much yet either :-/.

    What exact version are you using btw?

    /Jan

  • Ryan Nguyen 27 posts 80 karma points
    Apr 17, 2015 @ 20:18
    Ryan Nguyen
    0

    Jan,

    The current version i'm using is Umbraco version 7.2.1 assembly: 1.0.5462.37503

    2015-04-17 12:57:11,774 [6] WARN  umbraco.macro - [Thread 41] Error loading partial view macro (View: ~/Views/MacroPartials/Test.cshtml). Exception: System.ArgumentNullException: Value cannot be null.

    Parameter name: content

       at Umbraco.Web.Macros.PartialViewMacroEngine.Execute(MacroModel macro, IPublishedContent content)

       at umbraco.macro.LoadPartialViewMacro(MacroModel macro)

       at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)

     

    Thanks
    Ryan

  • Ryan Nguyen 27 posts 80 karma points
    Apr 17, 2015 @ 20:48
    Ryan Nguyen
    0

    It seems like this problem is fixed in the latest version of Umbraco version 7.2.4 assembly: 1.0.5557.19139.

    However, if the page is unpublished, the macro will not render.  

    Thanks

    Ryan

  • 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