November 10th, 2003, 08:59 PM
Custom Tag Problems
I have recently moved my web site from a CF5 server to a CFMX server (shared hosting). The site was working fine on CF5. Now when my web page calls a Custom Tag I receive the following error:
Cannot find CFML template for custom tag cartweaver. ColdFusion attempted looking in the tree of installed custom tags but did not find a custom tag with this name.
The error occurred on line 22.
I have my custom tags in the same subdirectory as when the site was on the CF5 server. Also, I have tried moving the custom tag to the same directory as the calling page and still I receive the same error.
I am using "cf_customtag" notation and I've tried all the various other alternatives (e.g., CFMODULE TEMPLATE). I've specified the exact path/location of the custom tag and still an error. The error changes somewhat, but it's the same basic error.
Does anyone know what might be causing this? I've tried everything I know to remedy this to no end. I'm starting to believe that the problem is not my code, but some other issue with the cf server and its setup. If so, what do I tell my hosting provider? They believe the issue is with my coding.
Any assistance is appreciated.
Here is the code that throws the error:
<cfif IsDefined ("FORM.SKU") >
November 11th, 2003, 10:00 AM
When you call a CF custom tag, the engine first tries to find the file in the same directory where you called the tag. If it doesn't find it there, it looks in the custom tag path. This is usually in something like c:\cfusionmx\customtags.
Make sure that your custom tag is in the customtags directory. The error you are getting is because CF can't find your custom tag.
You may also need to cycle the CF server to confirm this because CF caches the path to all custom tags once it finds them. The only way I know of to flush the cache is to cycle the server.
November 11th, 2003, 10:07 AM
As I stated, my custom tags are in my custom tags directory and I've even tried moving the custom tags to the same directory as the calling template--I thought that would be the easy fix. Neither works.
My host provider has responded to me saying:
My apologies for the delay. I think I may have found a solution to the problem. The path to CustomTags on the ColdFusion 5 server that you were on previously was:
The path to CustomTags on the ColdFusion MX server that you're on now is:
If there is a different path that you want us to specify for your custom tags, please let me know. We are unable to make the path on the MX server exactly the same as it was on the 5 server - otherwise the CF admin throws out an error.
I don't know what to tell them. Shouldn't my calling template still find the custom tag even on the CFMX server?
November 12th, 2003, 11:17 PM
It should as long as your tags are in the path that your host has specified, "/usr/local/coldfusionmx/CustomTags". Can they (or you) confirm that your tags are in that directory?