I am migrating a very old app (currently running in CF8) to Lucee. But I am running into a problem with what appears to be a custom tag of some sort.
I have tried to make sure that all the virtual directories are the same in IIS for both the old and the new installs. And made sure the mapping and custom tag paths in both the CFIDE and the Lucee Admin are the same.
But I am getting this error. And can't figure out how this cflink
is being instantiated.
I have found the location of the erroring code on line 300 the utils.cfc file
I haven't used custom tags in a long time but thought they were generally called with an underscore and the code should like more like <cf_link pageid="#LinkPageID#" Init="start">
if this was being called as a custom tag.
If I go the the current CF server that is running this app I can find that a cfclass files HAS been created From a file called cflink.cfm in a directory called "tags" even though there seems to be no mapping for the "tags" directory nor is is listed under "custom tags paths" in the administrator.
This App was start in 2003 and as you can imagine has grown into a mis-match of spaghetti code and no one from the beginning is around to ask how this tag is instantiated.
Does anyone with experience in legacy code has any other ideas where I should be looking to try to get this to work? The currently has only a production environment and if I can get it to work on Lucee it will not only be a dev environment that hasn't existed here in 10 years but will be a great way for me to be able to continue showcasing Lucee as a great CFML engine
Adding addition info
Leigh had asked if the init might be a jar reference but in the cflink.cfm file I see this code:
<cfif Attributes.Init IS "start">
<cfset Request.PageID = Attributes.PageID>
<cfset Request.Page_Width = Variables.qParentInfo.Page_Width>
<cfset Request.Page_Height = Variables.qParentInfo.Page_Height>
<cfset Request.Page_TypeID = Variables.qParentInfo.Page_TypeID>
<cfset Request.AddPath = "">
<cfif IsDefined("Attributes.Anchor")>
<cfset Request.Anchor = Attributes.Anchor>
<cfelse>
<cfset Request.Anchor = "">
</cfif>
<cfset Request.IsInternalLink = false>
<cfexit method="EXITTAG">
</cfif>
There are also references to cflink in the code inside tags\cflink.cfm
<cfif Len(Variables.qParentInfo.ParentID) GT 0>
<!--- Add the page title to the end of the path --->
<cfset Request.AddPath = ReplaceNoCase(Variables.qParentInfo.Nav_Title," ","_","ALL") & "/" & Request.AddPath>
<cflink init="working" pageid="#Variables.qParentInfo.ParentID#" popcode="#Attributes.popcode#">
<cfelse> ......</cfif>
Although this may be recursion given it was written in 2004 I kind of doubt it
Adding screen shots of searches
cfimport
calls? You can do some creative things with tag libraries. – Toominlink.cfm
. It has to be somewhere – Lundeencf
part. Doesn'tcf_
get added automatically or is Lucee different? – LundeenGETPAGEPATHS
. That looks like a custom function inside of cflink. – Lundeencflink.*
– Lundeen<cflink...>
? Might not. Also, long shot, but .. are there any custom jars in the class path or WEB-INF\lib? (Edit) James - Yeah, searching for non-tag references tocflink
(only) is a good idea. The name "init" made me wonder if it might be some sort of java tag? – Toomindata\cflink.cfm
is the file referenced in the code (unless it is old code that was never removed ;-). If so, I am baffled as to how they did it. Anyway, for grins, what happens if you use<cf_link>
, rather than<cflink>
? – Toominthe function init has an invalid return value , can't cast null value to value of type [this]
but I am not sure if it is related or not. I understand that a jar file is a compiled file and could contain anything. the names for sure do not represent anything like link or cflink but there are several jars that have obsure name. Is there an easy to search their contents? – Preengage