Copied to clipboard

Flag this post as spam?

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


  • SinkyPars 132 posts 175 karma points
    Oct 15, 2010 @ 18:13
    SinkyPars
    0

    Macros not working in RTE

    Hi guys,

    I have an issue with version 4.0.4.2 regarding using macros in the RTE. It simply does not work. instead when I look at the HTML in the page all i get is:

    <?UMBRACO_MACRO macroAlias="CallOut" />

    Any help would be much appreciated.

    Thanks

     

    Sinky

  • Jan Skovgaard 11280 posts 23678 karma points MVP 12x admin c-trib
    Oct 17, 2010 @ 00:37
    Jan Skovgaard
    0

    Hi SinkyPars

    Try going to the developer section and find the macro - is the label "use in editor" checked? It should be.

    And how do you render the RTE content? Are you using the RenderMacroContent extension to do this?

    /Jan

  • SinkyPars 132 posts 175 karma points
    Oct 17, 2010 @ 12:24
    SinkyPars
    0

    The use in editor is checked Jan :(

    I installed the CWS which I belive uses the default RTE. Do I have to install andother extention to get this to work?

    Thanks

     

    S

  • Jan Skovgaard 11280 posts 23678 karma points MVP 12x admin c-trib
    Oct 17, 2010 @ 12:33
    Jan Skovgaard
    0

    It seems like the content from the RTE is being fetched using umbraco:item tags in the template section.

    I don't think it can handle it when you have macroes in your RTE. Then you need to fetch and render the content by creating a XSLT macro, where you use the mentioned extension.

    in the XSLT file you can for instance write...

    <xsl:value-of select="umbraco.library:RenderMacroContent($currentPage/data [@alias ='bodyText'], $currentPage/@id)" />

    This should do the trick for you.

    Hope this helps

    /Jan

  • SinkyPars 132 posts 175 karma points
    Oct 18, 2010 @ 11:07
    SinkyPars
    0

    Unfortunatley this has made no difference and I still get "No macro content available for WYSIWYG editing" appearing in the editor even though I have checked "use in editor" and "render content in editor" - I am now pulling my hair out.

    Here is my code:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [
        <!ENTITY nbsp "&#x00A0;">
    ]>
    <xsl:stylesheet
        version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:msxml="urn:schemas-microsoft-com:xslt"
        xmlns:umbraco.library="urn:umbraco.library"
        exclude-result-prefixes="msxml umbraco.library">
       
        <xsl:output method="xml" omit-xml-declaration="yes"/>




    <xsl:param name="currentPage"/>

    <xsl:template match="/">


    <xsl:value-of select="umbraco.library:RenderMacroContent(concat('&lt;?','h1','&gt;','SINKY','&lt;/','h1','&gt;'),$currentPage/@id )" disable-output-escaping="yes"/>


    </xsl:template>

    </xsl:stylesheet>

     

    Any help is much appreciated.

     

    Thanks

     

    Sinky

  • SinkyPars 132 posts 175 karma points
    Oct 18, 2010 @ 18:02
    SinkyPars
    0

    Turns out this is a bug in umbraco itselft - I have reveverted to 4.0.3 and everything seems fine now.

    Thanks

    S

  • Jan Skovgaard 11280 posts 23678 karma points MVP 12x admin c-trib
    Oct 18, 2010 @ 18:04
    Jan Skovgaard
    0

    Happy you got it sorted...any particular reason why you are reverting instead of upgrading? (Just being curious :))

    /Jan

  • SinkyPars 132 posts 175 karma points
    Oct 18, 2010 @ 19:47
    SinkyPars
    0

    I would have to change all my XSL to work with the new schema no?

    Thanks

     

    S

  • Kim Andersen 1447 posts 2197 karma points MVP
    Oct 18, 2010 @ 19:54
    Kim Andersen
    1

    Hi Sinky

    You don't have to use the new XML schema in the new versions of Umbraco. You can still use the old schema by changing the following line in the umbracoSettings.config-file:

    <UseLegacyXmlSchema>false</UseLegacyXmlSchema>

    If you change this value to true, you ca use the old XML schema :)

    /Kim A

  • SinkyPars 132 posts 175 karma points
    Oct 19, 2010 @ 11:24
    SinkyPars
    0

    Great, in future I will defo use this,

    Thanks for the help.

     

    Sinky

  • 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