Link to home
Start Free TrialLog in
Avatar of Isaac
IsaacFlag for United States of America

asked on

cf error

My code was working fine and then all of a sudden this morning, I get the error below and it's very frustrating.
I can't figure it out.
Please HELP!
Thanks. :)

Error Occurred While Processing Request  
Element HLS.FIRST_NAME is undefined in SESSION.  
 
 
The error occurred in C:\CFusionMX\wwwroot\CFIDE\Isaac_Stage\specailReg\specialVol.cfm: line 138
Called from C: line -1
Called from C:\CFusionMX\wwwroot\CFIDE\Isaac_Stage\specailReg\specialVol.cfm: line 131
Called from C:\CFusionMX\wwwroot\CFIDE\Isaac_Stage\specailReg\specialVol.cfm: line 126
Called from C:\CFusionMX\wwwroot\CFIDE\Isaac_Stage\specailReg\specialVol.cfm: line 1
 
136 :         <td width="173" height="26">First Name:</td>
137 :         <td width="150"><cfinput name="FIRST_NAME"
138 :                                            value="#SESSION.HLS.FIRST_NAME#"
139 :                                        size="25"
140 :                                            message="First Name is required">
 

My piece of the code:
<CFIF NOT IsDefined("SESSION.HLS")>
      <CFSET SESSION.HLS = StructNew()>
      <!-- Represents current page.-->
      <CFSET SESSION.HLS.StepNum = 1>
      
      <!-- Assign user entries to the structure for the first page. -->
      <CFSET SESSION.HLS.FIRST_NAME = "">
</CFIF>
<CFIF IsDefined("form.FIRST_NAME")>
      <CFSET SESSION.HLS.FIRST_NAME = "#form.FIRST_NAME#">
</CFIF>


    <tr>
        <td width="173" height="26">First Name:</td>
        <td width="150"><cfinput name="FIRST_NAME"
             value="#SESSION.HLS.FIRST_NAME#"
             size="25"
             message="First Name is required">
        </td>
     </tr>

ASKER CERTIFIED SOLUTION
Avatar of Mause
Mause

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CFDevHead
CFDevHead

I just tested your code and it works fine.  check to see if sessions are enabled in your application page and if you can rebot your cf server.
I also tested it and works fine
but the cfset didn't work in the first place while StructInsert did
I don't know why

And yes as CFDevHead said check if the session are enabled in <cfapplication>
but I gues its turned on because it always worked!

Mause
Avatar of Isaac

ASKER

I get this error when I try Mause's idea.

Error Occurred While Processing Request  
Invalid CFML construct found on line 13 at column 56.  
ColdFusion was looking at the following text:
1

The CFML compiler was processing:

an expression beginning with "StructInsert", on line 13, column 20.This message is usually caused by a problem in the expressions structure.
a CFSET tag beginning on line 13, column 10.
a CFSET tag beginning on line 13, column 10.
 
 
The error occurred in C:\CFusionMX\wwwroot\CFIDE\Isaac_Stage\specailReg\specialVol1.cfm: line 13
 
11 :       <CFSET SESSION.HLS = StructNew()>
12 :       <!-- Represents current page.-->
13 :       <CFSET tmp=StructInsert(SESSION.HLS, "StepNum" 1>
14 :
15 :
 
 
Have tried rebooting the cf server?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
if it was working fine then it shld be working fine ... unless u disabled sessions on ur server ... or ur application.cfm .... else its kinda weird !
Avatar of Isaac

ASKER

Sorry for the late reply.  Been away.  Please close.