Hey all,
we are experiencing some issues with a module in our CF Application, we offer our users a verity search, for some (unknown reason) if the user enters, then exits then enters the search again the entire server goes mad... it displays us a message stating "Session is invalid"
the way the search works:
the actual search routine
The clearing of the results
As you can see the issue of the session going invalid is obviously related to the setting and resetting of #session.tmp.verity#; however this makes no sense...
When we started to have this issue we have tried the following ways to avoid the issue:
AND
AND
However in all scenario's, when the user enters the search for the second time in one session the session is declared invalid.
This would not be so much of a problem, however as this issue affects all sessions of the application (e.g. happens to all users when one user triggers it) it is seriously ruining our lives. The only way we have found to reset the sessions is one of the following 2 solutions:
1) Re-start the CF Application Server
2) change the ApplicationName in Application.cfc
If there is anyone out there who has had this before, please help!!
Many thanks,
B.
We never fail, we just find that the path to succes is never quite what we thought...
we are experiencing some issues with a module in our CF Application, we offer our users a verity search, for some (unknown reason) if the user enters, then exits then enters the search again the entire server goes mad... it displays us a message stating "Session is invalid"
the way the search works:
the actual search routine
Code:
<cfset sCollectionName = "verCol_#session.user.org_reference#" />
<cfsearch collection="#sCollectionName#" criteria="#form.criteria#" name="qVerityResults">
<cfif Not qVerityResults.recordCount>
<cfset session.tmp.errorMessage = "No results found, please try again" />
<cflocation url="searchform.cfm" addToken="no">
<cfelse>
<cfset session.tmp.verity = qVerityResults />
<cflocation url="searchresults.cfm" addToken="no">
</cfif>
The clearing of the results
Code:
<cfparam name="url.followUp" default="searchform">
<!--- clear the result set --->
<cfset session.tmp.verity = "" />
<!--- send user to follow up location --->
<cflocation url="#url.followUp#.cfm" addToken="no">
As you can see the issue of the session going invalid is obviously related to the setting and resetting of #session.tmp.verity#; however this makes no sense...
When we started to have this issue we have tried the following ways to avoid the issue:
Code:
<cfset StructDelete(session.tmp,"verity") />
<cfset session.tmp.verity = "" />
AND
Code:
<cfset StructDelete(session.tmp,"verity") />
<cfset session.tmp.verity = QueryNew("col,col2,col3") />
AND
Code:
<cfset cl = session.tmp.verity.columnList />
<cfset StructDelete(session.tmp,"verity") />
<cfset session.tmp.verity = QueryNew(cl) />
However in all scenario's, when the user enters the search for the second time in one session the session is declared invalid.
This would not be so much of a problem, however as this issue affects all sessions of the application (e.g. happens to all users when one user triggers it) it is seriously ruining our lives. The only way we have found to reset the sessions is one of the following 2 solutions:
1) Re-start the CF Application Server
2) change the ApplicationName in Application.cfc
If there is anyone out there who has had this before, please help!!
Many thanks,
B.
We never fail, we just find that the path to succes is never quite what we thought...