Solved

cf error

Posted on 2004-04-19
11
202 Views
Last Modified: 2013-12-24
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>

0
Comment
Question by:Isaac
  • 2
  • 2
  • 2
  • +2
11 Comments
 
LVL 10

Accepted Solution

by:
Mause earned 200 total points
ID: 10860100
Hi

try this:

<CFIF NOT IsDefined("SESSION.HLS")>
     <CFSET SESSION.HLS = StructNew()>
     <!-- Represents current page.-->
     <CFSET tmp = StructInsert(SESSION.HLS, "StepNum", 1)>
      
       <!-- Assign user entries to the structure for the first page. -->
       <CFSET tmp = StructInsert(SESSION.HLS, "FIRST_NAME", '')>
</CFIF>
<CFIF IsDefined("form.FIRST_NAME")>
     <CFSET SESSION.HLS.FIRST_NAME = "#form.FIRST_NAME#">
</CFIF>


Let me know,
Mause
0
 
LVL 9

Expert Comment

by:CFDevHead
ID: 10860107
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.
0
 
LVL 10

Expert Comment

by:Mause
ID: 10860215
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
0
 
LVL 5

Author Comment

by:Isaac
ID: 10862779
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 :
 
 
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 9

Expert Comment

by:CFDevHead
ID: 10862827
Have tried rebooting the cf server?
0
 
LVL 18

Assisted Solution

by:Plucka
Plucka earned 200 total points
ID: 10865465
Hi TheInnovator,

> 11 :      <CFSET SESSION.HLS = StructNew()>
> 12 :      <!-- Represents current page.-->
> 13 :      <CFSET tmp=StructInsert(SESSION.HLS, "StepNum" 1>

Your missing bits.

<CFSET tmp=StructInsert(SESSION.HLS, "StepNum", 1)>

Your missing the comma after "StepNum" and the closing ).

Regards
Plucka
0
 
LVL 17

Expert Comment

by:anandkp
ID: 10867312
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 !
0
 
LVL 5

Author Comment

by:Isaac
ID: 11118199
Sorry for the late reply.  Been away.  Please close.
0

Featured Post

New! My Passport Wireless Pro Wi-Fi Mobile Storage

Portable wireless storage to offload, edit, and stream anywhere.

High-capacity, wireless mobile storage designed to accompany professional photographers and videographers in the field to easily offload, edit and stream captured photos and high-definition videos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now