Skip to main content
Inspiring
January 30, 2009
Question

Problem with cfoutput

  • January 30, 2009
  • 4 replies
  • 491 views
Okay, here is something we do a zillion times, cfoutput some variable. So basic it is a no brainer. Right?

So why doesn't it work suddenly for 1 line?

I attached the code. Very basic error page.
But here is the output on the page. BTW it used to work fine and just started doing this

An error has occurred that has prevented your request from being completed.

In case this error was due to a communications problem on the network, you may want to hit the 'Refresh' button on your web-browser (Internet Explorer) to try again.

We have logged the following information that will help us identify and correct the problem:


#DateFormat(error.DateTime,"mm/dd/yyyy")# #TimeFormat(error.DateTime,"hh:mm:ss")#
Your IP address is 160.112.210.10
Your browser is Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
You were trying to process /dtr/index.cfm?
Message:
Element MOO is undefined in ARGUMENT.
The error occurred on line 11.

Why is it just displaying the line of code for the date/time? I've deleted that line and rewritten it. I've enclosed just that line in cfoutput tags.

Strange.
This topic has been closed for replies.

4 replies

Inspiring
January 30, 2009
Dinghus wrote:
> It isn't the error page itself that is the problem, nor is it the error. Take a look at the output for the DATE and TIME. I am actually getting the line of code vice the output.

Is that an <cferror> page? It looks like it because of #error#
structure. As such a page there or specific limitations to what can be
done on such a page as described in the documentation. Note in the
following documentation that validation and request errors can not use
any CFML. That means those dateFormat() and timeFormat() functions are
going to be ignored by such a page.

http://livedocs.adobe.com/coldfusion/8/htmldocs/Errors_09.html
Creating an error application page

The following table lists the rules and considerations that apply to
error application pages:

Type


Considerations

Validation
* Cannot use CFML tags.
* Can use HTML tags.
* Can use the Error.InvalidFields, Error.validationHeader, and
Error.validationFooter variables by enclosing them with number signs (#).
* Cannot use any other CFML variables.

Request
* Cannot use CFML tags.
* Can use HTML tags.
* Can use nine CFML error variables, such as Error.Diagnostics, by
enclosing them with number signs.
* Cannot use other CFML variables.

Exception
* Can use full CFML syntax, including tags, functions, and variables.
* Can use nine standard CFML Error variables and cfcatch variables.
Use either Error or cferror as the prefix for both types of variables.
* Can use other application-defined CFML variables.
* To display any CFML variable, use the cfoutput tag.



DinghusAuthor
Inspiring
January 30, 2009
It isn't the error page itself that is the problem, nor is it the error. Take a look at the output for the DATE and TIME. I am actually getting the line of code vice the output.
Inspiring
January 30, 2009
Seeing this,
Element MOO is undefined in ARGUMENT

the first thing I'd do is
<cfdump var="#arguments#">
Inspiring
January 30, 2009
Dinghus wrote:
>
> So why doesn't it work suddenly for 1 line?

Your error template is not failing. It is capturing an error from
somewhere else in the application. In other words, it is doing its job!

When one reads the error message one finds these four lines.
> You were trying to process /dtr/index.cfm?
> Message:
> Element MOO is undefined in ARGUMENT.
> The error occurred on line 11.

That says in the index.cfm page file on line 11 something is trying to
reference element 'MOO' in the structure 'ARGUMENT' and that structure
does not have such an element.

I'll bet dollars to doughnuts that some developer meant to type
*arguments*.moo.

HTH
Ian