Look for more than one Custom Tag Path defined in CF Administrator that
contains a custom tag with the same name-- perhaps even two definitions of
the same path.

Unfortunately, ColdFusion doesn't have a true definition of an "application"
to which it can bind a specific Custom Tag Path, so all are available to all
CF applications.

There are a couple of ways to resolve this, though.

One way is to use CFIMPORT (available in CFMX) to assign a specific a
namespace to each custom tag directory, which will eliminate occlusion, but
because CFIMPORT is a compile-time directive, you can't use a variable in
the path to the directory, so they must all be hard-coded and can be
annoying to change when migrating from server environment to server
environment.  This also means that you must copy the CFIMPORT directive to
each and every page that calls a custom tag, which is another hassle.

But our favorite method of resolving this is to use CFMODULE with the
Template syntax (as opposed to the Name syntax).  This lets you declare once
in a configuration file a variable containing the path to the directory that
contains your custom tags for a specific application, then use that variable
in all your calls to CFMODULE.

We even created a drag-and-drop utility named cf_2CFMODULE that
automatically converts all cf_ syntax calls to CFMODULE syntax calls, and
even closes empty custom tag calls to eliminate closing tag mismatches in
the converted code (just make sure to code your custom tags properly testing
for ThisTag.ExecutionMode so the code doesn't run twice).

The converted code will use a write-once constant named
Application.customTags that contains the path to the custom tags directory.
Since this is a write-once constant, you don't have to lock it in CFMX.  You
can do a search-and-replace for your CF5 application to change this to
Request.customTags to get around having to lock access to this variable in
CF5.

We created cf_2CFMODULE for our upcoming Plum product, but you can use it
for any ColdFusion application.  Just make sure to heed the warnings about
backing up your source code first.  You can get a free copy of cf_2CFMODULE
here:

http://www.ProductivityEnhancement.com/download/cf_2cfmodule.zip

Hope this helps.

Respectfully,

Adam Phillip Churvis
Member of Team Macromedia

Advanced Intensive Training:
* C# & ASP.NET for ColdFusion Developers
* ColdFusion MX Master Class
* Advanced Development with CFMX and SQL Server 2000
http://www.ColdFusionTraining.com

Download CommerceBlocks V2.1 and LoRCAT from
http://www.ProductivityEnhancement.com

The ColdFusion MX Bible is in bookstores now!
----- Original Message -----
From: "E C list" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, September 23, 2004 2:36 PM
Subject: Custom Tag Occlussion

> I am seeing an error appear in the application log on
> one of my CF 5.0 servers several times after a
> restart.  The weird thing is that its listing the same
> file name twice.  In other words the errors state that
> the first file will occlude the second file, but both
> are the identical file name.
>
> For example:
> In a CF_TagName construct custom tag file
> 'C:\CFUSION\CustomTags\ContentManagement\actUpdateVerity.cfm'
> will occlude custom tag file
> 'C:\CFusion\CustomTags\ContentManagement\actUpdateVerity.cfm'.
>
> Does anyone know what would cause this?
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to