Check your FORM tag along with any JS validation your doing.
Sometimes it can happen if you have a form tag that has:
OnSubmit:CheckForm() instead of:  onSubmit="return CheckForm();"
That way if the form validation false it would return false and NOT
process the form. Else might be doing it twice.

Just a thought. I may be way off base but worth a look.


 

-----Original Message-----
From: Barthle, Robert (Contractor) [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 23, 2007 3:37 PM
To: CF-Talk
Subject: Update: error emails firing for no reason (I still need help)

Update: I have the cause for why this is happening. The reason is that
the form processing page is calling itself mere seconds after it is
first called. The second time around, the form field do not exist, and
that's the reason for the error.

The problem is, there is nothing in the code that would cause that. And
it's all happening in the background.

The logs show that my computer's IP address makes a POST to the form
submission page, as it should when I submit the form. But anywhere from
1-3 seconds later, a GET request is sent from the same IP address for
the form submission page, and the listed referring page is the forms
processing page.

Here's the log entries. Can anyone help me as to why this might be
happening? On the form processing page there are no CFLOCATION, CFHTTP,
Javascript calls, anything that would cause a page to make an HTTP
request for itself.

(Sidebar: I have had this happen to me before on a personal site of
mine. I never understood what was happening until now. That code was
written back in CF5, so whatever is happening is something
longstanding).


172.16.27.0 - - [23/Jan/2007:15:12:48 -0500] "POST
/Programs/EROD/admin/index.cfm?action=save&CFID=2061637&CFTOKEN=4bc5e5d-
1002f118-a0ea-49e8-8c36-e3ff42f85e05&jsessionid=d6302ff0144c6545b1d3&sub
mit=&searchtext=&searchtitle=&order_by=resource_create_dt&order=ASC
HTTP/1.1" 200 40472
"http://wdchqdcold04.dev.ed.gov/Programs/EROD/admin/index.cfm?action=edi
t&resource_id=47" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"

172.16.27.0 - - [23/Jan/2007:15:12:49 -0500] "GET
/Programs/EROD/admin/index.cfm?action=save&CFID=2061637&CFTOKEN=4bc5e5d-
1002f118-a0ea-49e8-8c36-e3ff42f85e05&jsessionid=d6302ff0144c6545b1d3&sub
mit=&searchtext=&searchtitle=&order_by=resource_create_dt&order=ASC
HTTP/1.1" 200 34400
"http://wdchqdcold04.dev.ed.gov/Programs/EROD/admin/index.cfm?action=sav
e&CFID=2061637&CFTOKEN=4bc5e5d-1002f118-a0ea-49e8-8c36-e3ff42f85e05&jses
sionid=d6302ff0144c6545b1d3&submit=&searchtext=&searchtitle=&order_by=re
source_create_dt&order=ASC" "Mozilla/5.0 (Windows; U; Windows NT 5.0;
en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"

---------------------------------

172.16.27.0 - - [23/Jan/2007:15:13:13 -0500] "POST
/Programs/EROD/admin/index.cfm?action=save&CFID=2061637&CFTOKEN=4bc5e5d-
1002f118-a0ea-49e8-8c36-e3ff42f85e05&jsessionid=d6302ff0144c6545b1d3&sub
mit=&searchtext=&searchtitle=&order_by=resource_create_dt&order=ASC
HTTP/1.1" 200 40472
"http://wdchqdcold04.dev.ed.gov/Programs/EROD/admin/index.cfm?action=edi
t&resource_id=47" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"

172.16.27.0 - - [23/Jan/2007:15:13:14 -0500] "GET
/Programs/EROD/admin/index.cfm?action=save&CFID=2061637&CFTOKEN=4bc5e5d-
1002f118-a0ea-49e8-8c36-e3ff42f85e05&jsessionid=d6302ff0144c6545b1d3&sub
mit=&searchtext=&searchtitle=&order_by=resource_create_dt&order=ASC
HTTP/1.1" 200 34400
"http://wdchqdcold04.dev.ed.gov/Programs/EROD/admin/index.cfm?action=sav
e&CFID=2061637&CFTOKEN=4bc5e5d-1002f118-a0ea-49e8-8c36-e3ff42f85e05&jses
sionid=d6302ff0144c6545b1d3&submit=&searchtext=&searchtitle=&order_by=re
source_create_dt&order=ASC" "Mozilla/5.0 (Windows; U; Windows NT 5.0;
en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"



thanks
-r
_____________________________________
Rob Barthle
Contractor - Sr. Software Developer
[EMAIL PROTECTED]
202-245-6484 



-----Original Message-----
From: Barthle, Robert (Contractor)
Sent: Tuesday, January 23, 2007 11:38 AM
To: CF-Talk
Subject: error emails firing for no reason


I have a page that is acting extremely strange. It's a simple form
processing page that runs validation against some of the passed form
fields. If it fails any of the checks, it displays a basic error message
and asks the user to go back to the form to fix the changes (this was
not my work, it's legacy code). In order to do the checks, obviously the
form fields have to exist.
 
When I run the page and it finds a validation issue, the warning
messages are put into an array as the checks are done, and if that array
is found to have anything in it, the contents of the array are
displayed. If nothing is found, the database is updated. This processes
completely normally, nothing out of the ordinary.
 
But for some weird reason, when the warning messages are displayed, the
error emails that my onError function in Application.cfc creates are
also triggering, claiming the form field being checked in the very first
validation check cannot be found. To make matters weirder, the HTML page
that the onError code creates (in addition to the email that is sent) is
NOT displayed.
 
I have debugging turned on, and it shows all the form fields passed to
the page. Sure enough the field the error email claims is not there, is
in fact there.
 
I have tried wrapping the block the error email references in a
CFTRY/CFCATCH to try and muzzle it. The email still is being sent. So I
am really lost as to what is triggering these emails.
 
I have Ray Camden's code regarding the CFABORT/CFLOCATION issues with
onError already in. 
 
Any ideas at all?



thanks 
-r 
_____________________________________ 
Rob Barthle 
Contractor - Sr. Software Developer 
[EMAIL PROTECTED] 
202-245-6484 

 






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267368
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to