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

CF11 Site wide error handler setup

Engaged ,
Apr 30, 2015 Apr 30, 2015

Copy link to clipboard

Copied

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

Views

2.2K

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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!

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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
Documentation