Skip to main content
Known Participant
August 19, 2009
Question

Cannot find CFML template for custom tag

  • August 19, 2009
  • 2 replies
  • 7940 views

Why am I getting this error when my code looks like this?

Cannot find CFML template for custom tag UPSPrice.
ColdFusion attempted looking in the tree of installed custom tags but did not find a custom tag with this name. If you are using per-applica

<Cfif NOT form.shipzip IS "">
<CF_UPSPrice SERVICE="#form.upsshiptype#" FROM="#shopshipzip#" TO="#FORM.shipzip#" WEIGHT="#getshipweight.totwei#">
<cfelse>
<CF_UPSPrice SERVICE="#form.upsshiptype#" FROM="#shopshipzip#" TO="#FORM.zip#" WEIGHT="#getshipweight.totwei#">
</cfif>

    This topic has been closed for replies.

    2 replies

    Known Participant
    August 20, 2009

    So I put this in the if statement?

    <cfif isValid("zipcode", form.shipzip) and isValid("zipcode", getshipweight.totwei)>
    Inspiring
    August 20, 2009

    To validate the weight try this to check that the value is numeric and greater than zero.

    ]]>

    Val

    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_t-z_12.html#139109

    Known Participant
    August 19, 2009

    What if you use cfmodule?

    Known Participant
    August 19, 2009

    Not sure how to use it correctly. I have tried, but I think I am doing something wrong.

    Inspiring
    August 20, 2009

    It sounds like the CF server is unable to find UPSPrice.cfm file.

    You have a couple of options
    1. Use cfmodule to invoke the tag.  This will allow you to explictly tell CF where to find UPSPrice.cfm using the template attribute.

    2. Save your UPSPrice.cfm file in the ColdFusion8\CustomTags directory or the same directory as the calling page, or specify another location in the CF administrator.  See the topic "Creating and Using Custom CFML Tags" in the ColdFusion documentation.

    If you've tried CFMODULE without success please post:
    1. Your code.
    2. Your directory structure.
    3. Any mappings configured for your application.
    4. The error messages, if any, you receive.


    CFMODULE
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_m-o_06.html#1810047

    Creating and Using Custom CFML Tags
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=reuseCode_1.html#1136373