January 24th, 2012, 10:06 AM
Form data going missing
I have a timesheet system which has been in use for about 10 years. Recently an issue has arisenn whereby a number of users are having problems entering their hours.
Basically the form data goes missing between the data entry and the database update. The error displayed is of an undefined element.
I have been trying for some time to work out what is going on and have got as far as ascertaining that
a) the data is entered and the submit button is clicked
b) the template defined in the "form action" is loaded
c) the form fields are missing
I have not been able to reproduce this locally but having put some further debugging into the live system have noticed that there is a difference between 'client.cfid/cftoken' and session.cfid/cftoken'.
The system has been running so long and I have not had to do anything to it so my CF is a tad rusty but this struck me as odd, and a possible reason for the form data going missing.
Does thi sound as if it might be the problem, and if so any ideas why it might be happening.
I do not host the system myself, that is done by Hostway, so I do not have any access to the server.
Any help gratefully received.
January 24th, 2012, 05:40 PM
It could be. Client and Session are two different scopes. So data in the session scope isn't available in the client scope, and vice versa. Neither of these has anything to do with the form scope, by the way. But if data from the form scope is being put into one of the shared scopes (session or client), and some other code is looking for it in the other scope, it won't be there.
Does this application use CFCs? Depending on the server load, if the data is stored in a CFC within the session scope you can also get race conditions and threading issues if updates to the session-scoped data are not properly locked.
That said, without access to the code to run locally or access to the server, this is going to be extremely difficult to debug.
Last edited by kiteless; January 24th, 2012 at 05:44 PM.