Copied to clipboard

Flag this post as spam?

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


  • Tobias Nylin 24 posts 117 karma points
    Feb 02, 2017 @ 07:20
    Tobias Nylin
    0

    Issue when previewing macro in RTE

    Hi! I have a problem with previewing macros in RTE. If I create a new page and add a macro in the RTE the preview works fine. But as soon as I save the page (i.e. not publishing) the preview disappears and it will look like in the image below.

    enter image description here

    The markup for the macro will then look like this:

    <div class="umb-macro-holder mceNonEditable">
    <!-- <?UMBRACO_MACRO macroAlias="DocumentListMacro" DocumentPicker="1189,1190,1192,1191" /> --> 
    <ins>Macro alias: <strong>DocumentListMacro</strong></ins></div>
    

    When I finally publish the page the problem disappears and the macro is previewing as expected again. After that, saving works fine again.

    Does anyone have any idea why the previewing disappears when I only save the page?

    Thanks in advance!

  • Tobias Nylin 24 posts 117 karma points
    Feb 09, 2017 @ 14:19
    Tobias Nylin
    0

    Anyone? :)

  • Jurgen Wiersema 5 posts 75 karma points
    Feb 10, 2017 @ 13:50
    Jurgen Wiersema
    0

    I would also like to know the specific conditions in which the partial view macro's cshtml files are displayed correctly in all circumstances (edit screen, in rte, in front-end..)

  • Tobias Nylin 24 posts 117 karma points
    Mar 03, 2017 @ 09:36
    Tobias Nylin
    0

    I'm still having issues with this, does anyone have any idea what might be wrong?

    Thanks in advance!

  • Tim 225 posts 690 karma points
    Sep 14, 2017 @ 14:19
    Tim
    1

    Hi,

    This appears to be a reported issue: http://issues.umbraco.org/issue/U4-9075

    I've seen this too. There is a hacky fix. In that XSLT macros are unaffected. Therefore, depending on the complexity of your code it may be easier to use XSLT (If RTE preview support is vital).

    You can always offload the heavy lifting to C# and use an XSLT extension if it's complex. Thereby just using XSLT as a view (You end up with a nice MVC pattern doing this!). This also means that if they ever fix this issue it's easier to migrate it back to a partial.

Please Sign in or register to post replies

Write your reply to:

Draft