1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Template Modification Compiler Error

Discussion in 'XenForo Development Discussions' started by Daniel 'RTRD', Aug 20, 2013.

  1. Daniel 'RTRD'

    Daniel 'RTRD' Well-Known Member

    I can't get this modification to work:
    Code:
    <modification modification_key="UserRankRibbons_Member_Card" template="member_card" execution_order="50" action="str_replace" description="UserRankRibbons_Member_Card" enabled="1">
            <find><![CDATA[<div class="userInfo">
            <h3 class="username"><xen:username user="$user" class="NoOverlay" /></h3>
           
            <div class="userTitleBlurb">]]></find>
            <replace><![CDATA[<div class="userInfo">
            <h3 class="username"><xen:username user="$user" class="NoOverlay" /></h3>
            <xen:if is="@UserRankRibbonsActive"><xen:include template="UserRankRibbons_member_card" /></xen:if>
            <div class="userTitleBlurb">]]></replace>
        </modification>
    I get this when viewed in TM:
    ScreenShot139.png
    ScreenShot140.png

    Any solution for this? :)
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    Have you tried manually editing the template to see what the error is?
     
  3. Daniel 'RTRD'

    Daniel 'RTRD' Well-Known Member

    After creating the TM in debug mode I got this:
    ScreenShot141.png
    And after deleting the test TM it went back to this:
    ScreenShot139.png
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    The TM still failed to apply. Gave you tried directly adding it to the template to see what the error is?
     
  5. Daniel 'RTRD'

    Daniel 'RTRD' Well-Known Member

    If you mean the code; Yes, it works fine on the template. No errors.
     

Share This Page