Copied to clipboard

Flag this post as spam?

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


  • Oxid3 3 posts 23 karma points
    Dec 01, 2014 @ 16:38
    Oxid3
    0

    Umbraco - Macro Views not rendering

    We are having issues with MacroScripts on our test server. The application works locally and the code/ databases should be identical between the two.

    It is failing to render most of the MacroScripts as opposed to just one or two.

    Error loading MacroEngine script (file: Breadcrumb.cshtml)

    The stack trace in the error log says:

    2014-12-01 15:02:06,308 [22] WARN  Umbraco.Web.Routing.DefaultUrlProvider -[Thread     53] Couldn't find any page with nodeId=1658. This is most likely caused by the page not being published.
    2014-12-01 15:02:06,323 [22] WARN  umbraco.macro - [Thread 53] Error loading MacroEngine script (file: Breadcrumb.cshtml, Type: ''. Exception: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'umbraco.MacroEngines.DynamicNodeList' does not contain a definition for 'Any'
    at CallSite.Target(Closure , CallSite , Object )
    at ASP._Page_macroScripts_Breadcrumb_cshtml.Execute() in d:\HTTP\Development\Sodexo\MoneyBoostPhase4\MacroScripts\Breadcrumb.cshtml:line 25
    at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
    at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors)
    at System.Web.WebPages.WebPage.ExecutePageHierarchy()
    at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
    at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage)
    at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)
    at umbraco.macro.loadMacroScript(MacroModel macro)
    at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)

    I'm new to ASP and this issue is baffling me as it's working loaclly, but not on the dev server!

    Any help would be most appreciated .

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Dec 01, 2014 @ 17:00
    Dennis Aaen
    0

    Hi Oxid3 and welcome to our,

    Perhaps, this post can help you. http://our.umbraco.org/forum/developers/razor/44521-Razor-fails-using-ChildrenRandom Dependig on what version you are using it could seems that there have been a issue with Umbraco 6.1.4.

    And try to check this: http://our.umbraco.org/forum/developers/razor/45308-umbracoMacroEnginesDynamicNodeList-does-not-contain-a-definition-for-Random

    Hope this helps,

    /Dennis

  • Oxid3 3 posts 23 karma points
    Dec 01, 2014 @ 17:06
    Oxid3
    0

    Sorry, I should have stated - i'm using 6.1.6 - i'll review the links anyway just incase there is anything useful.

    Thanks for your quick reply.

    Dave.

  • Oxid3 3 posts 23 karma points
    Dec 01, 2014 @ 17:07
    Oxid3
    0

    I've reviewed those links, and tried a couple of the suggested actions with no luck unfortunately.

    OK i've come to the conclusion it's "Model.Ancestors().Any()" that's causing it. Any Macro with that in is dying.

    Regards,

    Dave.

     

  • Charles Afford 1163 posts 1709 karma points
    Dec 10, 2014 @ 16:40
    Charles Afford
    0

    That will be because in the developer section under the macro you will be able to assign it a code file. This file is either missing or the wrong file is assigned :).

    Does it work with out Model.Ancestors.Any()?

    Charlie :)

Please Sign in or register to post replies

Write your reply to:

Draft