Opened 13 years ago

Closed 10 years ago

#9382 closed defect (patchwelcome)

DTL: Error when a block is inside an IF that refers to an undefined variable

Reported by: wolfram Owned by: Neil Roberts
Priority: low Milestone: future
Component: DojoX DTL Version: 1.3.0
Keywords: Cc:
Blocked By: Blocking:


See this shows the problem and the error that is thrown.

The tpl is this:

	{% if data.x %}
		{% block insideBlock %}
			I am the inside block
		{% endblock %}
	{% endif %}

if data.x is undefined this throws the error message you see on the test page linked above, if data.x is defined it works. Removing the block inside doesnt throws an error if data.x is undefined, so it seems to be the combination of:

  • IF referring to an undeifned var
  • and a block inside this IF

Change History (3)

comment:1 Changed 13 years ago by wolfram

I just realized, the IF must evaluate to true otherwise it fails. So not only undefined is the problem, but that the IF must become true :-(.

comment:2 Changed 12 years ago by dante

Milestone: tbdfuture

comment:3 Changed 10 years ago by ben hockey

Priority: highlow
Resolution: patchwelcome
Status: newclosed

dtl is unsupported. any further patches are welcome.

Note: See TracTickets for help on using tickets.