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

Not a Bug Template compiler does not respect HTML comments for <xen:foreach>

Discussion in 'Resolved Bug Reports' started by tyteen4a03, Apr 29, 2013.

  1. tyteen4a03

    tyteen4a03 Well-Known Member

    I have this code:
    <xen:title>{xen:phrase 3ps_usergroup_ranks_usergroup_ranks_listing}</xen:title>
    <div class="baseHtml">
    <fieldset class="xenForm">
    <ol class="section ugList">
    <!--<xen:foreach loop="$userGroupRanks" value="$userGroupRank">-->
    However, when I view the page, I get:

    Template Errors: 3ps_usergroup_ranks_help_usergroup_ranks_listing
    Invalid argument supplied for foreach() in places\library\XenForo\Template\Abstract.php(265) : eval()'d code, line 12:
    11: <!--';
    12: foreach ($userGroupRanks AS $userGroupRank)
    13: {

    EDIT: Just tested <xen:if> and <xen:username> as well, the template compiler went ahead and compiled them.
  2. Mike

    Mike XenForo Developer Staff Member

    You want <xen:comment>. What you're seeing is entirely expected. The template compiler knows nothing about HTML.
    tyteen4a03 likes this.
  3. xf_phantom

    xf_phantom Well-Known Member

    Use <xen:comment> instead of the html comments

Share This Page