[ic] possible bug [error all=1 hide=1 comment="Clear
errors"]displays 1
John1
list_subscriber at yahoo.co.uk
Mon Jul 5 14:46:10 EDT 2004
On Sunday, July 04, 2004 10:35 PM, mike at perusion.com wrote:
> Quoting John1 (list_subscriber at yahoo.co.uk):
>> On Sunday, July 04, 2004 7:00 PM, ic_users at newmediaems.com wrote:
>>
>>> At 05:03 AM 7/4/2004, you wrote:
>>>
>>>> The tag:
>>>>
>>>> [error all=1 hide=1 comment="Clear errors"]
>>>>
>>>> as found in checkout.html, seems to return a "1" if there were
>>>> errors that were cleared. So a "1" gets displayed at the bottom
>>>> of the page.
>>>>
>>>> Is this by design? Is there any way of stopping it returning, or
>>>> at least, displaying a "1"?
>>>>
>>>> Thanks
>>>
>>> Hmmm - hide=1 is supposed to prevent that (I would assume) - how
>>> about just enclosing it in an html comment pair : <!-- -->
>>>
>> Works a treat - thanks Ed.
>>
>> How do I submit this as a bug (assuming it is a bug)? Or do I just
>> assume that someone from the development team will pick this up from
>> the mailing list?
>
> It is not a bug unless we document somewhere that hide=1 does that
> for the error tag. While hide=1 works for a lot of tags, it doesn't
> for all and it doesn't make sense for it to work for all.
>
> In fact, error all=1 is supposed to return something about all errors
> -- the number of errors if no other display option is selected --
> clearing them in the process unless you specify keep=1. Whether the
> hide parameter should work in that case is debatable.
>
> It would make more sense to me to have an [error clear=1], but that
> is easily accomplished with:
>
> [calc]
> delete $Session->{errors};
> return;
> [/calc]
>
> I don't think it is broke, so I am not going to fix it. 8-)
>
> By the way, you could have gotton a lot of information by doing:
>
> more lib/Code/SystemTag/error.coretag
>
> The source is the best documentation. I am certainly not saying that
> you should *have* to do that, I am reminding people of the benefits
> of open source.
>
> The combination of "grep -r <searchstring> /usr/local/interchange"
> and a file viewer can reap big benefits.
>
OK, fair point - maybe I should have investigated further before posting.
Also, the version of the Foundation demo I was using did have a bare
[error all=1 hide=1 comment="Clear errors"]
in checkout.html, but in recent releases this error tag now appears to be
wrapped in a [seti] tag, so it doesn't display anything any longer:
[seti clear_errors][error all=1 hide=1 comment="Clear errors"][/seti]
Thanks for your reply.
More information about the interchange-users
mailing list