Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Site-wide Error Handler issue

New Here ,
Dec 30, 2009 Dec 30, 2009

I'm having a strange one. I'm using CF 9.0, and I have a set up, with the relative path set correctly.When run-time errors occur, it is calling the template exactly as expected, except for one thing.

In addition to the error template (which shows a nice user-friendly page), I am also getting the default ColdFusion error information following.

So...error occurs, it is throwing to the error template as expected, but then also pushing out the default error page.

It does not do this on CF7 with identical code, so I am thinking that perhaps there is a setting on CF9 Administator that I'm not clicking. But search as I might, I only see the field.

Any suggestions? This is driving me batty.

1.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Dec 30, 2009 Dec 30, 2009

Any possibility that the error handler page itself is throwing the error.

If there is an error in the handler page, the handler can not handle it.  Thus a regular response is generated.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 30, 2009 Dec 30, 2009

ianskinner wrote:

Any possibility that the error handler page itself is throwing the error.

If there is an error in the handler page, the handler can not handle it.  Thus a regular response is generated.

I thought about that, but the error displayed is the same as the error that throws it. That is, it's a

Datasource  doesNotExist could not be found

error, that was put into the test template intentially.

I've attached the error handle template uncontrolled_err.cfm and the testing template cferror_test.cfm

I also attached a screen print of what the result looks like.

thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Dec 30, 2009 Dec 30, 2009

Where is uncontrolled_err.cfm invoked? Are you using CFERROR in an Application.cfm/ cfc file or the onError method of Application.cfc?

Can you post the relevant code?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Dec 30, 2009 Dec 30, 2009

Assuming the language in the original post is correct, this is being invoked from the "Site Wide Error Handler" setting in the Administrator page.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Dec 30, 2009 Dec 30, 2009

You might adding a CFABORT to the end of the uncontrolled_err.cfm page.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Dec 30, 2009 Dec 30, 2009

I suspect if you had taken the suggestion from the first bullet in the last error message and turned on "Robust Exception Information" it would quickly point to where the error is coming from.

There is a database call on line 95 of your uncontrolled_err.cfm file.  Does this DSN exist?  Has it been checked?

You also include other files with <cfmodule...> tags at that top and bottom of the file, do either of these files do any type of database actions?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 30, 2009 Dec 30, 2009

Thanks to all who are helping me with this!

ianskinner wrote:

I suspect if you had taken the suggestion from the first bullet in the last error message and turned on "Robust Exception Information" it would quickly point to where the error is coming from.

There is a database call on line 95 of your uncontrolled_err.cfm file.  Does this DSN exist?  Has it been checked?

You also include other files with <cfmodule...> tags at that top and bottom of the file, do either of these files do any type of database actions?

Yes, the DSN exists. If I comment-out the <cfmodule...> tags, as well as the <cfquery...>, I still get the same results: the default error page displays even though the error page is running.

The reported error is correctly identifying the error that has been set up to trigger the page.

Also, remember, this page works just fine w/o the extra default text on CF7. It's only on CF9 that it's showing up.

Adding <cfabort...> didn't change the behavior.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Dec 30, 2009 Dec 30, 2009

What do you get if you turn on "Robust Exception Information"?

You are presuming that since your test error is a DSN error and this extra message is about a DSN error, that they are the same error.  That is an unproven correlation.  Or at least you have not show us the proof.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 30, 2009 Dec 30, 2009

ianskinner wrote:

What do you get if you turn on "Robust Exception Information"?

You are presuming that since your test error is a DSN error and this extra message is about a DSN error, that they are the same error.  That is an unproven correlation.  Or at least you have not show us the proof.


Robust Exception Information is enabled on the Cold Fusion Administrator. I don't know why it wasn't showing earlier, but now when I run the test page I get the following:

Swift ErrorThe web site you are  accessing has experienced an unexpected error.
Please contact the website  administrator.

The following information is meant for the website developer for  debugging purposes.
Error Occurred While Processing Request

Datasource  doesNotExist could not be found.

The  error occurred in \\srv238\wwwroot\rjr\errorhandling\cferror_test.cfm: line  11
9 : This query calls a non-existent datasource, triggering an error to be handled. --->
10 : 
11 : <cfquery name="testQuery" datasource="doesNotExist">
12 : select * from nothing
13 : </cfquery>

DATASOURCE  doesNotExist
Resources:
Browser  Mozilla/4.0 (compatible;  MSIE 6.0; Windows NT 5.1; SV1; GTB6.3; .NET CLR 1.1.4322; InfoPath.2; .NET CLR  2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022;  .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC EA 2)
Remote  Address  172.21.10.142
Referrer 
Date/Time  30-Dec-09 01:21  PM
Stack Trace  (click to expand)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 30, 2009 Dec 30, 2009

OK, here's another bit of information I didn't think to tell before:

The error in the test file is an unknown datasource error. When this error fires, it shows both the system-wide-error-template and the default error template.

If I comment this out, and replace it with a <CFTHROW...>, I get the system-wide-error-template, BUT NOT THE DEFAULT ERROR TEMPLATE.

What does this mean?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Dec 30, 2009 Dec 30, 2009

What happens if you comment out line 180 of your uncontrolled_err.cfm file?

179 <cfoutput>
180 #error.generatedContent#
181 </cfoutput>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 30, 2009 Dec 30, 2009

ianskinner wrote:

What happens if you comment out line 180 of your uncontrolled_err.cfm file?

179 <cfoutput>
180 #error.generatedContent#
181 </cfoutput>

No difference. For a minute there, I was ready to face-palm, but commenting this out has no effect on the output.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Dec 30, 2009 Dec 30, 2009

Then I think it is time to start from step one.

What happens if you substitue a dirt simple exception handling file?  I would try a file with a single line of text that says something like "This is the error page".

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 30, 2009 Dec 30, 2009

An excellent idea.

I get a clear page that says 'This is the error page' and nothing else.

I now have something to start working with, adding parts back in until it breaks.

Thanks for the reminder of debugging code 101...I'll check back once I have an answer.

Thanks again for all the help!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 04, 2010 Jan 04, 2010
LATEST

Keep everything as before, and switch debugging off in the Coldfusion Administrator.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Dec 30, 2009 Dec 30, 2009

Please post your code.


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources