Friday, February 18, 2005

CF 7

I got burned today by an (apparently) undocumented change to the way that ColdFusion finds Custom Tags. This took a little bit of stomach acid, and a lot of patience to figure out.

It appears that when ColdFusion 7 tries to invoke a custom tag from the CustomTags folder, it look for the tag in sub-directories to the CustomTags folder before bothering to look in the CustomTags folder itself. So, if you have an old copy of a custom tag in CustomTags\old_tags, and a new copy in CustomTags, it will call the one in old_tags, and ignore the newer one. This is very counter intuitive, and was not the case in older versions of ColdFusion, including CF 5, and CF 6.1.

Furthermore, if you delete files in the sub-directory, ColdFusion doesn't realize it until you restart the server. It just gives an error.

Thursday, February 03, 2005

The requested scope application has not been enabled

On our intranet server, I keep the webservices in a seperate folder that is not a part of any application folder tree. The first time that I tried to access an application variable in a web service, I encountered the following error message:

CFCInvocationException:[The requested scope application has not been enabled]

It took me a little while to realize that the reason I was getting this error message was because the webservices folder was in a tree that had no application.cfm, and no . As soon as I added the above it started working perfectly. This may seem obvious, but at the time the problem seemed obscure (About 10 minutes on google got everything sorted out).