cf not seeing closing </cfloop> tag

View: New views
4 Messages — Rating Filter:   Alert me  

cf not seeing closing </cfloop> tag

by Imperial, Bob :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi folks,

I just tried to run a simple email routine that I've used for the last year with no issues but all of the sudden Coldfusion doesn't seem to see a closing </cfloop> tag, anyone ever run into this behavior before?

Error message:
Context validation error for tag cfloop.
The start tag must have a matching end tag. An explicit end tag can be provided by adding </cfloop>. If the body of the tag is empty you can use the shortcut <cfloop .../>.


The code:

<cfloop query="getProfessors">
<cfmail to="#getProfessors.email#" from="karen_clayton@..." bcc="bimperia@..." subject="Promotion/Appointment/Re-Appointment voting" type="html">
   <p>Hello Dr. #last_name#,<br />
    Below is the link to the website and instructions for voting for the personnel actions for DateFormat(getEndDate.end_voting, 'mmmm')#.
    </p>
    <p>
    Click on this link to access the website:  <a href="http://some.med.unc.edu/index.cfm?fuseaction=reviews.main&VoterID=#getProfessors.ID#">Appointment/Promotion/Reappointment Reviews</a> will take you to that  section of the Department of Medicine Intranet.  The candidates who are to be reviewed are listed here and each one can be accessed by clicking on their names.  As you select each candidate, a screen will appear that will allow you to Approve, Disapprove, or Abstain.  On this same screen, if you will click again on the individual's name, all of the materials supporting the action (such as CV, letters of recommendation, etc) will appear for you to review.  Once you have read the material, click on the "X" in the top right hand corner of the screen which will return you to the screen which will allow you to cast your vote for that individual.  Click the approve, disapprove, or abstain box and then click "Submit Vote".  You will receive the message "Thank you, your vote has been recorded!  To return to the candidate review listing click here".  You will then be returned to the listing to continue voting.
    </p>
    <p>
    You are permitted to leave the website and return to continue voting as often as needed.  Your votes will remain anonymous.  Please cast your ballots by #DateFormat(getEndDate.end_voting, 'mmmm dd')# at 5:00 PM.  If you have any questions about the website or the voting process, please let me know.
    </p>
    </cfmail>
</cfloop>

Any insight would be appreciated.

Thanks!

Bob



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4872
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.15

RE: cf not seeing closing </cfloop> tag

by Dave Phillips-10 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Bob,

Not sure what is causing your problem.  Try using <cfmail
query="getProfessors" and get rid of the cfloop altogether and see if it
works or if you get a different error.  If you get a different error, then
something might be hosed with your files or your CF installation.  I've had
quirky stuff happen before where even a CF restart didn't solve the problem,
but a re-install did.  

I've also had this type of problem when I've saved the file and I tried to
run it before it finished writing, OR, when the file didn't get written
completely for some reason.  Sometimes just resaving didn't solve it.  I had
to copy the contents from my editor, delete the original file and then
re-create it.  If you want to try that first before getting rid of the
cfloop, that might tell you if it was the problem or not.

HTH,

Dave Phillips

-----Original Message-----
From: Imperial, Bob [mailto:bob_imperial@...]
Sent: Sunday, November 01, 2009 7:39 PM
To: cf-newbie
Subject: cf not seeing closing </cfloop> tag


Hi folks,

I just tried to run a simple email routine that I've used for the last year
with no issues but all of the sudden Coldfusion doesn't seem to see a
closing </cfloop> tag, anyone ever run into this behavior before?

Error message:
Context validation error for tag cfloop.
The start tag must have a matching end tag. An explicit end tag can be
provided by adding </cfloop>. If the body of the tag is empty you can use
the shortcut <cfloop .../>.


The code:

<cfloop query="getProfessors">
<cfmail to="#getProfessors.email#" from="karen_clayton@..."
bcc="bimperia@..." subject="Promotion/Appointment/Re-Appointment
voting" type="html">
   <p>Hello Dr. #last_name#,<br />
    Below is the link to the website and instructions for voting for the
personnel actions for DateFormat(getEndDate.end_voting, 'mmmm')#.
    </p>
    <p>
    Click on this link to access the website:  <a
href="http://some.med.unc.edu/index.cfm?fuseaction=reviews.main&VoterID=#get
Professors.ID#">Appointment/Promotion/Reappointment Reviews</a> will take
you to that  section of the Department of Medicine Intranet.  The candidates
who are to be reviewed are listed here and each one can be accessed by
clicking on their names.  As you select each candidate, a screen will appear
that will allow you to Approve, Disapprove, or Abstain.  On this same
screen, if you will click again on the individual's name, all of the
materials supporting the action (such as CV, letters of recommendation, etc)
will appear for you to review.  Once you have read the material, click on
the "X" in the top right hand corner of the screen which will return you to
the screen which will allow you to cast your vote for that individual.
Click the approve, disapprove, or abstain box and then click "Submit Vote".
You will receive the message "Thank you, your vote has been recorded!  To
return to the candidate review listing click here".  You will then be
returned to the listing to continue voting.
    </p>
    <p>
    You are permitted to leave the website and return to continue voting as
often as needed.  Your votes will remain anonymous.  Please cast your
ballots by #DateFormat(getEndDate.end_voting, 'mmmm dd')# at 5:00 PM.  If
you have any questions about the website or the voting process, please let
me know.
    </p>
    </cfmail>
</cfloop>

Any insight would be appreciated.

Thanks!

Bob





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4873
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.15

Re: cf not seeing closing </cfloop> tag

by Leonard Boche :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Bob,

In reviewing the code sample you provided, the only thing I can see that might be causing you an issue is the single "#" sign associated with the getEndDate query.

<!--- Possible problem area
<p>Hello Dr. #last_name#,<br />Below is the link to the website and instructions for voting for the personnel actions for DateFormat(getEndDate.end_voting, 'mmmm')#.</p>
--->

CF is most likely trying to process everything after the # sign which is voiding out your closing <\cfloop> tag/process. Try adding a # sign to the beginning like you did further down in your code and see if things work.

If that does not fix the problem, then try piecing things together until you find the culprit of the problem.

Leonard

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4874
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.15

RE: cf not seeing closing </cfloop> tag

by Imperial, Bob :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


You are correct, so much for trying to work late on a Sunday :)

Thanks Leonard!

Bob


-----Original Message-----
From: Leonard Boche [mailto:leonard.boche@...]
Sent: Monday, November 02, 2009 12:07 AM
To: cf-newbie
Subject: Re: cf not seeing closing </cfloop> tag


Hi Bob,

In reviewing the code sample you provided, the only thing I can see that might be causing you an issue is the single "#" sign associated with the getEndDate query.

<!--- Possible problem area
<p>Hello Dr. #last_name#,<br />Below is the link to the website and instructions for voting for the personnel actions for DateFormat(getEndDate.end_voting, 'mmmm')#.</p>
--->

CF is most likely trying to process everything after the # sign which is voiding out your closing <\cfloop> tag/process. Try adding a # sign to the beginning like you did further down in your code and see if things work.

If that does not fix the problem, then try piecing things together until you find the culprit of the problem.

Leonard



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4875
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.15