Skip to main content
February 5, 2008
Answered

Missing Template Handler Issues

  • February 5, 2008
  • 2 replies
  • 868 views
Hi there, we're having some problems setting this up. We get the custom page we've created but still see the default coldfusion information..... Here's what we've done..

(1) Set the path correctly in the Coldfusion Admin > Settings. 'Missing Template Handler'.
(2) Made the changes in IIS as described here... http://kb.adobe.com/selfservice/viewContent.do?externalId=95ee04fb&sliceId=1
    This topic has been closed for replies.
    Correct answer
    After a search I found the problem.

    There were bits in the code that were referencing session variables.

    Generally speaking session and application variables are not accessible on the missing template handler.

    2 replies

    Participating Frequently
    February 6, 2008

    You are using CF8 right? Because it works just fine for me.

    Here is what I did to test.

    1) created a simple cfm template with nothing more than <cfoutput>helloworld</cfoutput> and saved it as missing.cfm in my webroot ( http://localhost/missing.cfm
    2) logged into the coldfusion administrator and added /missing.cfm into the box where it asks for the missing template relative path.
    3) hit submit changes.

    then browsed out to http://localhost/SomeStrangePageThatDoesntExist.cfm

    and as expected saw only "missing"

    The only thing I can think of is that you have in your missing template page another cfinclude that is failing.

    Try the above approach and see if you continue to get the error.
    February 7, 2008
    Note: That I do see my custom error template as I should, BUT then also see the default CF Missing Template Message. Dont understand why I see both.

    No we are on CF 7.

    I'm writing to a NEW CF log file I called 'Missing Templates'... I notice that it gets hit about 40 times. Which I mean its writing to the logs 40 times each time I hit the missing template. This is odd, as I assumed that it would be only one hit per missing page request.

    Not sure whats going on. Our IT guys made some changes in IIS... I believe we are operating with multiple sites on CF server, with possibly multiple instances of Coldfusion server as well.

    I've also searched the code for any <Cfinclude> and <cfmodule> I could fine.. there isn't any that I could find in order to rule out the possibility you suggested.

    Correct answer
    February 7, 2008
    After a search I found the problem.

    There were bits in the code that were referencing session variables.

    Generally speaking session and application variables are not accessible on the missing template handler.

    Participating Frequently
    February 6, 2008
    which default coldfusion information would you be talking about? Debugging? could you post a screenshot of the information

    You could also try and use the onmissingtemplate method in the application.cfc like in the code I attached


    Thanks,
    February 6, 2008
    >which default coldfusion information would you be talking about? Debugging?

    No, the default missing template error message. ( see below )

    The 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
    File not found: test2.cfm