Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Tag not being found! What's the problem? 2

Status
Not open for further replies.

Chloeee

Programmer
Jan 16, 2001
27
US
I have a new installation of ColdFusion 4.5 and have a need to use a custom tag that I have written. I am able to place the tag in the same directory as the calling template and get the expected results.

However, I need to use this application throughout the site. When I move the tag to the Cfusion/CustomTags directory on the server, the calling template doesn't find it. Within the error message it indicates that it looked within the same directory as the calling template but did not find it, then stopped. It's like it's not even trying to find the tag in the custom tags directory.

Am I doing something wrong or overlooking something? Thanks in advance to anyone who can help me!
 
How are you calling the custom tag as they can be called with the cfmodule tag or with the &quot;<cf_&quot; syntax?

If your tag is called &quot;mytag.cfm&quot;, invoking it with <cf_mytag var1=&quot;1&quot;...> should find it in the cfusion\customtags directory. If you are using cfmodule, there could be a problem with your syntax or a missing mapping.

GJ
 
i would check in the server configuration ... but i don't remeber i which part :-(
hope gunjack could help more ;-)
 
i would check in the server configuration ... but i don't remember in which part :-(
hope gunjack could help more ;-)
 
I appreciate you guys helping out. Unfortunately, I am not using CFModule, so that issue isn't involved. A user of another list suggested I check out the CF path to the tags in the registry, but that ended up a dead end since the path is right. I wish this had yielded some clue. If I don't find an answer soon, I will be forced to place the custom tag in every directory I need to use it in, in order to make it work! Quite messy. Anyhow, thanks for the advice guys.
 
What path is it using for the custom tags directory and are there any other cfm files in there? Also, can you post the line where you invoke the custom tag? I can help you resolve this but it may take a little trial and error.

GJ
 
Ahhh... after extensively searching the Allaire forum, I found that others with this problem were given advice to try verifying the path to the CustomTags directory in the Registry.

HKEY_LOCAL_MACHINE\software\allaire\coldfusion\currentversion\customtags\CFMLTagSearchPath

The other piece of wisdom I saw there was to simply be sure to restart the server after placing a tag that was in a previous location. In my case, the Registry entry was correct, so I crossed my fingers and restarted the server. That worked!!!

The explanation given was that sometimes if a tag is invoked from one place, the location is cached and the server continues to looked in the cached locale until the server is reset, the cache is cleared, and the server is forced to do the entire tag search like it's supposed to.

I post this answer to perhaps help others with the same problem and let you guys that responded know that I'm on go again, and to thank you. I happened upon this forum in my quest to solve this particular problem, and will continue to follow threads of interest. Thanks!
 
Sorry about that. I didn't put two and two together. I've had that happen before and should have realized that when you called it from the first directory, you wouldn't be able to just move it without an error. It's unfortunate that CF doesn't check the entire tree when a tag is no longer in the same place.

Glad you got it working,
GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top