Oops, something is wrong with the form you posted (it doesn't have a question set id).

Permalink
I have a form with an upload file option. This is the error I received when trying to upload a file... any ideas?

Fatal error: Uncaught exception 'Exception' with message 'Oops, something is wrong with the form you posted (it doesn't have a question set id).' in /home/rynomed1/public_html/rynomediaonline.com/concrete/blocks/form/controller.php:204 Stack trace: #0 /home/rynomed1/public_html/rynomediaonline.com/concrete/models/block.php(276): FormBlockController->action_submit_form() #1 /home/rynomed1/public_html/rynomediaonline.com/concrete/startup/process.php(214): Block->passThruBlock(Array, Array) #2 /home/rynomed1/public_html/rynomediaonline.com/concrete/dispatcher.php(226): require('/home/rynomed1/...') #3 /home/rynomed1/public_html/rynomediaonline.com/index.php(2): require('/home/rynomed1/...') #4 {main} thrown in/home/rynomed1/public_html/rynomediaonline.com/concrete/blocks/form/controller.php on line 204

cannonf700
 
Tony replied on at Permalink Reply
Tony
out of curiosity, are you hard coding the form block or using it from the scrapbook, or are you just using it as a standard block?
cannonf700 replied on at Permalink Reply
cannonf700
standard form block.
hursey013 replied on at Permalink Reply
hursey013
I'm also receiving this error, somewhat randomly though. When I review my error logs, it happens once every 10 or 20 submissions. I'm using a standard form block as well, no file upload option, just regular text fields.
tutordelphia replied on at Permalink Reply
Did you guys ever figure out a solution? I'm having the same error
sygon replied on at Permalink Reply
sygon
Yeh I get this

controller.php:
function action_submit_form() {
...
if($qsID==0)
throw new Exception(t("Oops, something is wrong with the form you posted (it doesn't have a question set id)."));

1) after a form submit, the qID not set(reading from the db for the set of questions and not responding fast enough from server)

2) another one:
When you create a form and create some required fields and partially fill it out and click the submit button, so that message "Complete required fields" comes out. If you now try to highlight the web browser url and "press enter to reload" in Safari(it will ignore the #anchor tag and process page) you get this error message:

"Fatal error: Uncaught exception 'Exception' with message 'Oops, something is wrong with the form you posted (it doesn't have a question set id)."

e.g. url is "www.site.com/index.php?cID=1&bID=873&arHandle&ccm_token=1370910640:5908dda131d4cb888d3034eb3258095d&btask=passthru&method=submit_form#1364271682"

- If you remove the #1364271682 and press enter(it will process the page) and you get same error message in FF,IE,Chrome

3) upload a file - yeh had to change some db mysql settings, can't remember now.
sygon replied on at Permalink Reply
sygon
concrete/blocks/form/controller.php:
$txt = Loader::helper('text');
$db = Loader::db();

if (!isset($_POST['qsID'])) {return;} //fix 2)

//question set id
$qsID=intval($_POST['qsID']);
if($qsID==0)
throw new Exception(t("Oops, something is wrong with the form you posted (it doesn't have a question set id)."));
kirkroberts replied on at Permalink Reply
kirkroberts
@sygon: I have a website having this same issue — but without a file upload, just text boxes — but don't understand your post... are you saying that adding the //fix 2) line resolves the issue for you? I tried adding that and it didn't seem to work.

This site is running an old version of c5, but the forms worked previously.

Can you elaborate on your findings?
kirkroberts replied on at Permalink Reply
kirkroberts
False alarm. My issue ended up being something to do with the "send from" address and setting these in config/site.php fixed the issue:

define('EMAIL_DEFAULT_FROM_ADDRESS', 'someemail@something.com'); //from email for form submissions and such
define('EMAIL_DEFAULT_FROM_NAME', 'Somebody'); //name displayed for the above email
define('FORM_BLOCK_SENDER_EMAIL', EMAIL_DEFAULT_FROM_ADDRESS); //set the form block from email to the default from email
abra100pro replied on at Permalink Reply
abra100pro
Perfect! That did it for me! Thanks!

concrete5 5.6.3.1