nocte
Well-known member
- Affected version
 - 2.0.9
 
I suppose this is a bug. Here's my use case:
Template modification for admin template
If I add a
So this works:
	
	
	
		
And this gives me the error:
	
	
	
		
				
			Template modification for admin template
user_edit (inside the privacy_select macro).If I add a
<xf:explain> with some text after the last <xf:option> Tag, it works. If I wrap this tag inside an <xf:if> Tag, i get this error:Tag if contains an unexpected child element.
So this works:
		HTML:
	
	<xf:macro name="privacy_select" arg-name="!" arg-label="!" arg-user="!" arg-hideEveryone="{{false}}">
    <xf:selectrow name="privacy[{$name}]" value="{$user.Privacy.{$name}}"
        label="{$label}">
        <xf:option value="none">{{ phrase('nobody') }}</xf:option>
        <xf:if is="!$hideEveryone">
            <xf:option value="everyone">{{ phrase('all_visitors') }}</xf:option>
        </xf:if>
        <xf:option value="members">{{ phrase('members_only') }}</xf:option>
        <xf:option value="followed">{{ phrase('people_x_follows', {'name': ($user.username ? $user.username : '[' . phrase('user') . ']')}) }}</xf:option>
        <xf:explain>Some text</xf:explain>
    </xf:selectrow>
</xf:macro>
	And this gives me the error:
		HTML:
	
	<xf:macro name="privacy_select" arg-name="!" arg-label="!" arg-user="!" arg-hideEveryone="{{false}}">
    <xf:selectrow name="privacy[{$name}]" value="{$user.Privacy.{$name}}"
        label="{$label}">
        <xf:option value="none">{{ phrase('nobody') }}</xf:option>
        <xf:if is="!$hideEveryone">
            <xf:option value="everyone">{{ phrase('all_visitors') }}</xf:option>
        </xf:if>
        <xf:option value="members">{{ phrase('members_only') }}</xf:option>
        <xf:option value="followed">{{ phrase('people_x_follows', {'name': ($user.username ? $user.username : '[' . phrase('user') . ']')}) }}</xf:option>
        <xf:if is="$condition">
            <xf:explain>Some text</xf:explain>
        </xf:if>
    </xf:selectrow>
</xf:macro>