Error - Element X is Undefined in Session

0 coldfusion session cfml

Getting this Error

ELEMENT CURRLANGUAGE IS UNDEFINED IN SESSION.

Don't understand why. It was working fine until yesterday

<cfif session.currLanguage eq 'English'>
   <cfset session.currLanguage = ''>
</cfif>
Run Code Online (Sandbox Code Playgroud)

TRo*_*ose 9

Because currLanguage is not defined in the session scope. Womp Womp.

Try this to see what IS defined.

<cfdump var="#SESSION#">
Run Code Online (Sandbox Code Playgroud)

It could be that something is not being set when it should. We'd have to see your code to tell for sure. If you think it's working okay and want to prevent unnecessary error messages in the future, you can do a check like this:

<cfif structKeyExists(SESSION, "currLanguage") AND SESSION.currLanguage is "English">
Logic Logic Logic
</cfif>
Run Code Online (Sandbox Code Playgroud)