This content has been marked as final. Show 2 replies
Coldfusion opens the page at least twice, once when it is unrefreshed and once when it is refreshed. Since Application.cfm runs at the beginning of a request, it will also run just before the unrefreshed page is opened. The presence of the cferror tag in Application.cfm will make Coldfusion to fire the cferror event immediately an exception is detected in a request. That is probably how Coldfusion gets aware of the missing variables.
Keep the cferror tag. Then do either of
1) <cfparam name="nameOfVariableColdfusionComplainsIsMissing" default="someValueToKeepCFQuiet">
2) Append the query-string ?refresh=1 to the (refreshed) URL you're redirecting to, then modify your code as follows
<cfif isDefined("URL.refresh") and URL.refresh EQ 1>
<!--- code for refreshed variables--->
<!--- code for unrefreshed variables--->
I have a simular issue with an application I have.
Coldfusion complains that a variable is undefined in a page, the session variable is a dynamic variable that I put together after collecting some information. Here is how it works.
A student selects a class: 130L
A sudentt selects the location for the class: Location
Then I set the session variable: session.130L_Location = the value selected (NY)
If the student selects (decide later) for the location of the class, then I set the value of session.130L_Location to 0
In the fron end, there are no errors reported at all, however I keep getting the error email saying that session.130L_Location is undefined. Now the cferror tag is executed, the error email is sent, but there is no redirection of the user to the error page. The user stays in the screen they are in and no instances of an error are showed to the user.
Just so you know .. at all times session.130L_Location is defined ..
I'm not sure what is going on here ..