There was - you move the UDF to a file and cfinclude it. You also
ensure you only cfinclude when thistag.executionmode is "start"

On 5/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I remember this bug - I think it was something to do with declaring a udf in
> a custom tag but it was a long time ago now. IIRC there wasn't a fix.
>
> > -----Original Message-----
> > From: Claude Schneegans [mailto:[EMAIL PROTECTED]
> > Sent: 26 May 2006 23:08
> > To: CF-Talk
> > Subject: Function defined twice
> >
> > Hi,
> >
> > How come I can get this error (under CF5):
> >
> > "Routines cannot be declared more than once.
> > The routine *removeMark* has been declared twice in different templates.
> > The error occurred while processing an element with a general identifier
> > of (), occupying document position (1:1) to (1:1) in the template file
> > C:\...\AUTONOUVCONFIRM.CFM
> >
> > 1º The function is declared in autonouvconfirm.cfm like this:
> > <CFSCRIPT>
> > function removeMark(text)
> >     {
> >     return REreplace (text, '</?SPAN[^>]*>', "", "all");
> >     }
> > </CFSCRIPT>
> >
> > 2º it is called twice in the same file like this:
> >
> > <TEXTAREA STYLE="display:none"
> > NAME="nouvTitle">#removeMark(nouvTitle)#</TEXTAREA>
> > <TEXTAREA STYLE="display:none"
> > NAME="nouvSummary">#removeMark(nouvSummary)#</TEXTAREA>
> >
> > 3º There are no other occurrence of "removeMark" in the whole project
> >
> > 4º the template autonouvconfirm.cfm is called only once in the whole
> > project like this:
> > <A
> > HREF="autoNouvConfirm.cfm?adr=#URLencodedFormat(nouvUrl)#&org=#url.org#"
> > TARGET="_blank">#title#</A>
> >
> > (I mean not as a custom tag)
> >
> > Of course, this never happens when I try the templates, only once every
> > 1000 times, I get this in my error log.
> >
> > --
> > _______________________________________
> > REUSE CODE! Use custom tags;
> > See http://www.contentbox.com/claude/customtags/tagstore.cfm
> > (Please send any spam to this address: [EMAIL PROTECTED])
> > Thanks.
> >
> >
> >
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241781
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to