Skip to main content
Inspiring
April 24, 2010
Question

CF8 has stopped populating form scope

  • April 24, 2010
  • 1 reply
  • 1459 views

G'day

For reasons that escape (and somewhat bamboozle ~) me, my CF8 server (just using the internal JWS for the web server) has stopped populating the form scope when a form is submitted.  Say I run this code:

<cfdump var="#form#">

<form action="<cfoutput>#CGI.script_name#</cfoutput>" method="post" name="frm1">
     <input type="text" name="txt1" value="" /><br />
     <input type="submit" name="btnSubmit1" value="Submit" />
</form>

When I submit the form, I simply get the dump outputting an empty struct.  I have verified that the HTTP request is being made properly: it's a POST, and the form field/value pairs are in there too.  Just nothing in the form scope.

I'm pretty sure there's no "stop the form scope from working" setting in CF, and I cannot find anything that might contribute to such behaviour.  And, also, I've not changed anything in the environment recently (although I would say that, obviously 😉

It's not some weirdness with an Application.cf(c|m) buggering things up, as I have a blocking Application.cfm in the same dir as the file.  So the first line of CF code that gets executed is the <cfdump>.  I have a 99.9% certainty it is nothing in the code causing this.  Plus the above is just my repro case.  The actual form I'm working on is in a completely different directory subtree, with no common ancestor to the one my test code is in, and - indeed - no commonality of code.

I have stop/started CF a couple of times.

There is nothing wrong with the form that I can see, and BlueDragon serves the form up (and has its form scope populated) no problems.

And when I was working on this code the day before y/day, it all worked fine on CF8 then.

Weird.

Any ideas of where to look to check what might be going on?

Cheers for any suggestions.

--

Adam

Oops.  Submitted before I had finished typing.  Updated so that the middle para makes sense.

    This topic has been closed for replies.

    1 reply

    Inspiring
    April 24, 2010

    Err... OK... weird.  It's started working again now.  And this didn't seem to require any specific input from me... it just started working again.  I just cracked on with my coding, thinking "well if I need to test anything, I'll use BlueDragon instead, and deal with this later", and inadvertantly refreshed the CF8 window rather than the BD one, and the form worked fine.  I went back to the test form I posted before, and simply reloaded it (resending the form data), and that worked too.  And that definitely had not had any changes made to it since I last saw it not work.

    "It's just one of those things", I guess.

    If anyone's had this happen before and knows why, I'd still be keen to know WTF was going on, but for my immediate purposes, this issue has self-corrected.

    Cheers.

    --

    Adam

    Inspiring
    May 23, 2010

    Argh!

    It's happening again.

    I augmented the test rig this time to also dump out getHttpRequestData(), and I can see the form fields in there.  Just not in the form scope.

    I shall reboot and see what happens after that...

    --

    Adam

    Inspiring
    May 26, 2010

    Weird... if I crank up my CF9 instance and try the same thing, the same thing happens, so I can't understand how it's a CF thing... but equally I can't think what else it would be.  Also weird is that if I refresh the browser after the initial form submission "fails", then the stuff does show up in the form scope (this is both on the CF8 & CF9 instance).  I'm not sure what to make of that.

    --

    Adam