Periodically we are getting this crash with one of our domains:
Element CHOOSEEVENT is undefined in CLIENT.
Here is the code snippet where the error is generated. The last line gives the error.
Note that the code is buried in a cfif testing for the existence of client.chooseevent and that the immediate preceding SQL statement references the variable successfully!
<cfif isdefined("client.chooseevent") and not request.listevent>
AND (Client.CustomerID is not 0)
<cfset str1 = client.customerid>
<cfif not isdefined("request.qrySeletedEvent_#client.chooseevent#_#str1#")>
SELECT * FROM evdata
AND evdel = 0
AND evCST ='#client.customerid#'
<cfset request["qrySeletedEvent_#client.chooseevent#_#str1#"] = qrySeletedEvent>
We are using the original release of ColdFusion 8 Enterprise. Client variables are stored in a database and the domain is NOT being load-balanced between two CF instances.
Place <cfparam name="client.chooseevent" default="test_value"> at the top. Then place <cfdump var="#client#"> at two appropriate places, to find out where and how the variable disappeared.
P.S.: for the test server, not on the production server!
Since the failure is a rare event, what I did instead was do a <cfsavecontent> of a <cfdump var="#client#"> after the initial <cfif> and after every statement between it and the last statement where the variable shows up missing.
Around that last two statements I placed a <cftry> with the <cfcatch> sending me an email of all the dumps.
After a couple of days it happened and, sure enough, variable "chooseevent" was in "client" after every statement except the <cfquery>. After it, the variable no longer existed in "client".
Which, of course, makes no sense.
So, after the initial <cfif> I decided to do a <cfset holdchooseevent=client.chooseevent> and use "holdchooseevent" throughout the remainder of the body of the <cfif>. After several more days, there have been no apparent problems.