Copied to clipboard

Flag this post as spam?

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


  • Nick 42 posts 155 karma points
    Nov 18, 2015 @ 12:33
    Nick
    0

    Macros are rendering as <Macro: (,)>

    Hi,

    I have a Umbraco 7.2.8 site that was rendering some custom razor macros fine.

    However now whenever there is:

    @Umbraco.RenderMacro("MacroNameHere") 
    

    in the template, instead of rendering the macro output the following is rendered to the screen when the page loads,

    <Macro: (,)>

    This happens for a number of different macros in the template.

    The template is rendering the

    @Umbraco.Field("FieldNameHere") 
    

    fields correctly.

    Does anyone know how to fix this please?

    thanks,

    Nick

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Nov 18, 2015 @ 15:11
    Sebastiaan Janssen
    100

    Usually means that the macro with "MacroNameHere" doesn't exists in the macros tree or the file related to "MacroNameHere" doesn't exist.

  • Nick 42 posts 155 karma points
    Nov 18, 2015 @ 16:12
    Nick
    1

    Thanks Sebastiaan.

    That has solved it, it appears although the macro partial .cshtml file still exists the Macro has been deleted.

    I have recreated the Macros and assigned the .cshtml file to them and this has fixed the problem.

    Thanks again.

    Nick

Please Sign in or register to post replies

Write your reply to:

Draft