Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

<CFERROR>

Guest
Dec 07, 2008 Dec 07, 2008
I thought this was going to be real easy...

I have added the following lines to my application.cfm file as follows:
<cfapplication sessionmanagement="yes" name="rv">
<cferror type="request" template="syserror.cfm" exception="any">
<cferror type="exception" template="syserror.cfm" exception="any">

I have a page called syserror.cfm. This page displays correctly when an error is executed, but I am unable to execute any coldfusion commands on this page?!?! Why?

I did a simple test:

<CFSET test = "5">
<CFOUTPUT>
#test#
</CFOUTPUT>

When this page loads - my output for the above code is: "#test#"

Which means this page is not executing Cold Fusion code - the rest of the site is fine.

I was wondering why my CFMAIL code (which I took out before I posted this) to email the error to myself was not working - and this is why - it is not executing CF. What would cause ColdFusion to not be able to execute CF on this template generated from the CFERROR tag?

Below is my syserror.cfm page code:

<HTML>
<link href="test.css" rel="stylesheet" type="text/css" />
<body background="images/h_02.jpg">
<table width="949" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="173" colspan="2" valign="top" background="images/h_01.jpg" />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="110" width="50"> </td>
<td> </td>
</tr>
<tr>
<td height="53"> </td>
<td></td>
</tr>
</table>
<td width="1"></td>
</tr>
<tr valign="top">
<td width="25" bgcolor="#BF4446"> </td>
<td width="924" align="left" bgcolor="white" valign="top">
<table width="500" border="0" align="center" cellpadding="0" cellspacing="7">
<tr>
<td width="128" align="center"><img src="images/page-error.gif" width="128" height="128" /></td>
<td width="351" align="center" class="style36 style41"><p>SYSTEM ERROR HAS OCCURRED</p>
<p><a href=" http://www.test.com" target="_parent">Click here to return to Test.com</a></p></td>
</tr>
<tr>
<td colspan="2"><p class="style34">Our technical team has been notified of this error. If this error persists after 24 hours, please email our technical guy, at <a href="mailto: test@test.com">test@test.com</a> and tell him specifically what you were trying to do when the error occurred.</p>
<p class="style34">Thank You.</p>
</td>
</tr>
</table>

<p class="style1"> </p>
<p class="style1"> </p>
</CFIF>
</td>
</tr>
<tr>
<td colspan="2"><img src="images/h_04.jpg" width="949" height="12" /></td>
</tr>
</table>
<CFSET test = "5">
<CFOUTPUT>
#test#
</CFOUTPUT>
</body>
</HTML>
TOPICS
Advanced techniques
339
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Dec 07, 2008 Dec 07, 2008
I had a </CFIF> that was out of place that was the problem. It is working correctly now.
Translate
Guest
Dec 07, 2008 Dec 07, 2008
I had a </CFIF> that was out of place that was the problem. It is working correctly now.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 08, 2008 Dec 08, 2008
LATEST
Read the docs. From CFML Reference Manual:

<CFERROR TYPE="Request">:

Includes the error variables described in the Error variables section.
*Cannot include CFML tags*, but you can display values of the error
variables by enclosing them in number signs (#), as in #error.MailTo#.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources