Copied to clipboard

Flag this post as spam?

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


  • Steen Tøttrup 191 posts 291 karma points c-trib
    Apr 11, 2011 @ 14:47
    Steen Tøttrup
    0

    A macro in the editor in 4.7 doesn't generate proper output

    With Umbraco 4.7 I've put a macro in the editor (back-office) and it renders nicely in the editor, but when looking at the content on the actual website, there's no visible content.

    When I take a look in the html source (on the actual website), this is what I get:

    <?UMBRACO_MACRO macroAlias="Blah" />

    The macro is actually a xslt file, and just to make sure that the xslt isn't the issue, right now it should just output a text, nothing else.

    But still no output!

    Any ideas?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 11, 2011 @ 20:10
    Jan Skovgaard
    0

    Hi Steen

    Do you render the content from the RTE field using umbraco:Item or using another XSLT file? If you're rendering it using another XSLT file you probably need to render it using the GetItem extension or perhaps RenderMacro.

    Does this help?

    /Jan

  • Steen Tøttrup 191 posts 291 karma points c-trib
    Apr 12, 2011 @ 07:45
    Steen Tøttrup
    0

    Hi Jan

    Let's see what Mads thinks about your solution, hopefully it will fix his issue!

    Thanks

     

  • Mads Jørgensen 74 posts 226 karma points
    Apr 12, 2011 @ 07:56
    Mads Jørgensen
    0

    Hi, working on the same case, and has just tested this through...

     

    using umbraco.library:RenderMacroContent(), the output will show.

    I've got a local copy of the same site, where rendering in the editor component fails... Any ideas here?

     

    Steen original issue solved :-)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 12, 2011 @ 21:45
    Jan Skovgaard
    0

    Hi Mads

    Do you get any error messages? And what version is your local site running? Also 4.7?

    /Jan

  • Mads Jørgensen 74 posts 226 karma points
    Apr 13, 2011 @ 07:53
    Mads Jørgensen
    0

    Hi,

    No error messages, only the default message from all earlier versions

    No macro content available for WYSIWYG editing

    And all settings are right on the Macro etc... It's all synced directly from the working edition :-S

    Version is also 4.7, as it is a mirrored setup.

     

    --

    Mads

  • Dibar 92 posts 74 karma points
    Apr 13, 2011 @ 19:16
    Dibar
    0

    Just a couple thoughts to toss in the mix.

    I have found that hyphens or other punctuation in property aliases can prevent data-type controls from rendering when trying to create content. Also be sure that if you have imported a package that all the data types are still saving as the db-type you intented (that is, none have been switched from ntext to nvarchar or date, etc.) 

     

    I was once creating content in rich-text editors, then trying to insert that content in other rich text editors with macros. Long story short→You can't call a macro to display content that itself calls a macro. Something somewhere is going to be improperly escaped, and it can come out as <?UMBRACO_MACRO macroAlias="Blah" /> or similar on the actual delivered page.

  • Dibar 92 posts 74 karma points
    Apr 13, 2011 @ 19:25
    Dibar
    0

    I should say, you can't successfully call a macro which calls another macro using only insertions into content via the TinyMCE rich-text editor. You CAN call macros in your templates, which can have content that calls macros too. I think

Please Sign in or register to post replies

Write your reply to:

Draft