Form loading the home page and no "thanks" message
Permalink
Hey folks. I have a c5 site with a pretty standard Contact Us page that has a form on it. Upon submitting, the site then loads the home page and there's no "thanks" message. I assume the "thanks" message would show if the Contact Us page was loading. Any ideas? Thanks.
I've updated to 5.3.3.1 but still have the same issue. Any ideas?
I think I've found the culprit. There's this form element:
<input name="pURI" type="hidden" value="" />
and I believe the value should be something like:
/index.php?cID=53 (the cID for that page)
Not sure why it's blank or how to fix?
<input name="pURI" type="hidden" value="" />
and I believe the value should be something like:
/index.php?cID=53 (the cID for that page)
Not sure why it's blank or how to fix?
This is definitely the problem. c5 uses (among other things) $_SERVER['REQUEST_URI'] to tell the form to reload the same page the form is on which can then display the Thanks message. Turns out that the site I'm developing is hosted on IIS (yuk) and Apache on IIS can display null for $_SERVER['REQUEST_URI'] (see this:http://www.dokeos.com/forum/viewtopic.php?t=8335... )
Boo on IIS. Boo on me for not making this client host somewhere decent. I could hack the core and have it use $_SERVER['PHP_SELF'] instead, but that's lame.
Boo on IIS. Boo on me for not making this client host somewhere decent. I could hack the core and have it use $_SERVER['PHP_SELF'] instead, but that's lame.
Test page set up here:
http://c5.carrabbaconservation.com/index.php/contact-us/justin-test...
http://c5.carrabbaconservation.com/index.php/contact-us/justin-test...
action="/index.php?cID=53&bID=89&arHandle=Main&ccm_token=1259086326:f990a3bb3ad1ddb119071c9ac204d7af&btask=passthru&method=submit_form"