Skip to main content
Known Participant
February 11, 2013
Question

onMissingTemplate not working on sub-directories

  • February 11, 2013
  • 1 reply
  • 958 views

Hi, I have an application where onMissingTemplate would fire off when any missing .cfm file was executed.  This was in CF9, I upgraded to CF10 and it no longer works as expected.  Is there a setting I need to change in CF10?

CF9

/application.cfc - with onMissingTemplate

/doesnoteexist.cfm - Fires onMissingTemplate

/nofolderhere/doesnoteexist.cfm - Fires onMissingTemplate

CF10

/application.cfc - with onMissingTemplate

/doesnoteexist.cfm - Fires onMissingTemplate

/nofolderhere/doesnoteexist.cfm - DOES NOT fire onMissingTemplate

Thanks for any help!

This topic has been closed for replies.

1 reply

Inspiring
February 11, 2013

I think there's something you're not telling us, or there's something else afoot. Your examples all work fine for me.

You don't tell us what web server you have configured, which is possibly relevant. I'm just testing with the inbuilt web server. This proves from a ColdFusion pov the functionality is A-OK, but does not determine whether there's a problem with the web server connector, or whether some config needs to take place on the web server too.

Are you getting a CF error message, or a web server error message?

Also, the file is Application.cfc, not application.cfc. It doesn't matter so much on Windows, but it's good to get these things right. It will not affect your current problem though.

--

Adam

Known Participant
February 11, 2013

You're correct, I did miss some details.

I'm on a new windows computer that is running Apache with CF10.  My old windows computer was Apache with CF9.  I copied the http.conf and vhost.conf files from the old computer and put them on the new computer so I assumed all the settings would be the same.

I've looked through all my settings and I cannot find any mod-rewrites or settings that would allow onMissingTemplate to work inside the same folder but not in missing sub-directories.

Thanks for any tips you might have!