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

CF11 Site wide error handler setup

Engaged ,
Apr 30, 2015 Apr 30, 2015

Hi

... can't seem to get the site wide error handler to work on my new CF11 server....

I built a simple error handler cfm page and put it into my CF server root (not the site root) and created a test.cfm with an intentional CF error (a cfinclude tag that points to a missing file) that I put into my site root.

In CF admin I pointed the Site wide error handler to my error handler page and clicked submit, and CF admin came back with a confirmation message saying all is well.

Any Coldfusion errors are still being handled by the default template and not my custom error page. Does anyone know anything else I could try?

Thanks in advance,

Rich

2.4K
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
Engaged ,
Apr 30, 2015 Apr 30, 2015

Also, I just checked my log files and there's no indication of an error in my cfException.cfm file.... Very weird....

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
Advocate ,
Apr 30, 2015 Apr 30, 2015

The error templates are called relative to the page you are calling. So if your page is in C:\www\ then you need to place the error page in that same folder (or sub folder of that folder). So your setting in coldfusion would just be /error.cfm I think as well that if you access the page directly on the server running CF11 that you will just get the default cf error page with the exception.

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
Engaged ,
Apr 30, 2015 Apr 30, 2015

haxtbh

You were correct in that I'm able to directly call my error page  (which throws an error because I'm referencing a Coldfusion error that does not exist) from the browser, but I'm still not able to get CF to call my custom error file instead of the system default file.... I even tried absolute pathing my custom error file in the CF Admin but it didn't like that....

Rich

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
Advocate ,
Apr 30, 2015 Apr 30, 2015

You said in your first post you put the error page in the in the cf server root and the test page in the site root. My post was telling you that this is wrong. The error page needs to be relative to the template calling it. Have you put the error page there, corrected the coldfusion setting and are still getting the error?

i.e.

Website directory:

C:\www\

C:\www\test.cfm

C:\www\error_pages\error.cfm

Coldfusion error handler setting:

/error_pages/error.cfm

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
Engaged ,
Apr 30, 2015 Apr 30, 2015

Hi haxtbh

Here is my configuration:

CF Server: C:/Coldfusion11/wwwroot/

(if I don't put my custom cfException.cfm file here the CFAdmin complains, this seems to be the only place I can put my custom error page).

Site root: D:/inetpub/wwwroot/production/

(I tried putting my custom cfException.cfm file here but any errors by pages in this site still don't use my custom error file)

THE ONLY TIME I CAN GET MY CUSTOM ERROR PAGE TO KICK IN:

If I'm logged in directly to the server where CF lives on and use the url: http://localhost/test.cfm then my custom error page gets displayed.

Being mindful that my custom error page is, in fact in D:/inetpub/wwwroot/production AS WELL AS C:/Coldfusion11/wwwroot/, and any site errors don't seem to be triggering my custom error page....

I think we're close.... Thanks for your help with this!

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
Advocate ,
May 01, 2015 May 01, 2015
LATEST

Have you read this blog post about error pages from a couple of months back? I assume you are using IIS due to the paths you are using.

Custom Error + onMissingTemplate + CF + IIS = confusion?? Not Exactly — Adobe ColdFusion Blog

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