Bizarre bug with inline error messages
Marc Palmer <[email protected]> Wed, 19 Apr 2006 08:31:39 +0100
| Newsgroups | gmane.comp.java.webmacro.user |
|---|---|
| Message-ID | <[email protected]> |
Guys,
This one is rather confusing, and worrying me. I will be rifling
through the WM source shortly to see what I can find but thought I'd
raise it here first in case somebody has already been down this path.
Basically, in -some- cases, but consistently, we are getting a
garbled inline HTML comment error message coming out when evaluating
a null. What is worrying about this is the nature of the garbling...
see the output HTML:
<h1>Game Referrals</h1>
<table>
<tr>
<td>Total game referrals last month</td>
<td>6</td>
</tr>
<tr><td valign="top">By game</td>
<td>
<table>
<tr>
<td>[<!-- Value is null: $Form.gameID at /var/www/ignition/
module]:</td>
<td align="right">1</td>
</tr>
<tr>
<td>[BIKE]:</td>
<td align="right">1</td>
</tr>
</table>
</td></tr>
OK first problem, the "-->" is missing from the end of the comment.
Then you realise that "/var/www/ignition/module" is not the full path
to the template that caused the problem. So we have some error output
truncation going on.
Then you realise that $Form.gameID is not even the variable it was
evaluating?! The template fragment that generates the above is here:
<h1>Game Referrals</h1>
<table>
<tr>
<td>Total game referrals last month</td>
<td>$model.statsGameReferrals.c</td>
</tr>
<tr><td valign="top">By game</td>
<td>
<table>
#foreach $row in $model.statsGameReferralsByGame
<tr>
<td>[$row.v]:</td>
<td align="right">$row.c</td>
</tr>
#end
</table>
</td></tr>
...so any ideas why it is getting completely the wrong variable
reference in the error here? $Form.gameID is not referenced anywhere
in this template, nor any of its includes.
This is worrying because it feels like a thread safety problem.
Thanks in advance,
Marc
~ ~ ~
Marc Palmer ([email protected])
Consultant/Analyst
AnyWare Ltd.
http://www.anyware.co.uk/
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642