Answered
Session Problem
Hi,
We are developing a site in CFMX 6 and for some reason the session variables we set are not carrying over to other pages in the site. For example, we have put the following code in each page in an attempt to figure out what is going wrong:
<cflock scope = "Session" timeout = "30" type = "Exclusive">
<cfif IsDefined("url.category")>
<cfset session.siteCategory= #url.category#>
<cfoutput>
URL Category Defined Block: URL = #url.category# <br />
Session = #session.siteCategory#
</cfoutput>
<cfelseif IsDefined("session.siteCategory")>
<cfoutput>
session is defined block #session.siteCategory#
</cfoutput>
<cfelse>
<cfset session.siteCategory= "all">
<cfoutput>
In Default Block #session.siteCategory#
</cfoutput>
</cfif>
</cflock>
This code basically says that if the session is defined, do nothing.
Each new page accessed is not reflecting the updated session variable value that was updated on a previous page. We have never had problems like this before at any other companies or any any other CF projects. If anyone has any idea what might be going wrong your reply is appreciated....
Thanks!
We are developing a site in CFMX 6 and for some reason the session variables we set are not carrying over to other pages in the site. For example, we have put the following code in each page in an attempt to figure out what is going wrong:
<cflock scope = "Session" timeout = "30" type = "Exclusive">
<cfif IsDefined("url.category")>
<cfset session.siteCategory= #url.category#>
<cfoutput>
URL Category Defined Block: URL = #url.category# <br />
Session = #session.siteCategory#
</cfoutput>
<cfelseif IsDefined("session.siteCategory")>
<cfoutput>
session is defined block #session.siteCategory#
</cfoutput>
<cfelse>
<cfset session.siteCategory= "all">
<cfoutput>
In Default Block #session.siteCategory#
</cfoutput>
</cfif>
</cflock>
This code basically says that if the session is defined, do nothing.
Each new page accessed is not reflecting the updated session variable value that was updated on a previous page. We have never had problems like this before at any other companies or any any other CF projects. If anyone has any idea what might be going wrong your reply is appreciated....
Thanks!
