Error when submitting a form

Permalink
Hi Everyone,

Im facing a problem, i cant figure out how to fix it and its really important coz the website is published. the version i'm using is 5.7.3.1

there are multiple forms in the website and they were working fine but suddenly we started to receive this error after submitting the forms

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

http://www.dataflowgroup.com/contact-us/submit_form#formblock945...

Please can someone help me with this its urgent

here is one of the forms

http://www.dataflowgroup.com/contact-us...

Doodlimah
 
mnakalay replied on at Permalink Reply
mnakalay
Hello,
This is strange, that error message should only appear if the field qsID is not there or has no value. That's not your case, it is there and it has a value.

Are you sure you didn't modify the form block's controller?
Doodlimah replied on at Permalink Reply
Doodlimah
Thank you for the reply, I' m working with another developer on this and he did some changes on the view.php regarding some validation but other than that nothing was changed and this was a almost month ago and the forms were working fine!

when this error occurred we replaced the modified files with the original files but still this didn't fix the error
mnakalay replied on at Permalink Reply
mnakalay
You should ask your developer to json_encode the whole $_POST and log it to the dashboard and check if $_POST['qsID'] is present or not.
MrKDilkington replied on at Permalink Reply
MrKDilkington
@mnakalay

I am not familiar with logging to the dashboard. Are you able to include an example?
Doodlimah replied on at Permalink Reply
Doodlimah
Im not sure how to do this can you please explain, Thank you
mnakalay replied on at Permalink Reply
mnakalay
Yes it's just a quick and dirty hack I use.

Go to the form block's controller: concrete\blocks\form\controller.php
At the top just under the list of "use something" add
use Log;

Then look for the function
function action_submit_form() {

and add the line
Log::addEntry('form submitted data: ' . json_encode($_POST));

Make sure to add it BEFORE the line
$qsID=intval($_POST['qsID']);

Then submit your form and go to your dashboard under Reports > Logs you should see the data saved from your form, starting with the sentence "form submitted data:"

Check that qsID is there and has a value. If it just looks like gibberish, paste it here so we can have a look
MrKDilkington replied on at Permalink Reply
MrKDilkington
This is interesting, thank you.
piyushsoft replied on at Permalink Reply
i have used you logic but still issue is not fixed , please help me to short it.
Doodlimah replied on at Permalink Reply
Doodlimah
@mnakalay Thank you very much, @piyushsoft will continue with you on this since he is the one working on the files
piyushsoft replied on at Permalink Reply
i have follow the below steps but not get any positive result.

Log::addEntry('form submitted data: ' . json_encode($_POST));

it's giving me the below error

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

even i have checked log ,

updates\concrete5.7.3.1\concrete\blocks\form\controller.php:265 Oops, something is wrong with the form you posted (it doesn't have a question set id). (0)
mnakalay replied on at Permalink Reply
mnakalay
If you have followed exactly what I said and you couldn't find anywhere in the logs the sentence "form submitted data:" before the error then your controller must be overriden somewhere.

Listen, I think this is really counter productive. I think it would be really much faster if you could send me by PM (not here where it's public) access to your dashboard so I can see the logs and access to your FTP so I can check the files.
piyushsoft replied on at Permalink Reply
Hello Dear ,

have you account on Skype ,please add me on your skype contact my skype username is:

piyush.rensoft
mnakalay replied on at Permalink Reply
mnakalay
ok I am adding you now but I will only be available in around 1 hour
mnakalay replied on at Permalink Reply
mnakalay
@Doodlimah

basically your developer starte by sending me some exe file as if anybody in their right mind would download an exe file from a total stranger.

Than he said he wanted to share his screen for me to fix your problem. I explained to him that I do this for a living and when I am offering to do it for free I don't want it to take hours and screen sharing was certainly not an option. I said I could probably fix the problem quickly if I had admin and ftp access.
I told him he could check me out on this concrete5 website to see that I am totally trustworthy and it's not the first time I help people like that. I'm also an agency partner, PRB member, and I have several add-ons in the marketplace.

He simply stopped answering.

Well here's my final words about all this:
1- I don't really appreciate having my time wasted when I am trying to help
2- I don't think your dev knows much about Concrete5

Good luck with your site.
Doodlimah replied on at Permalink Reply
Doodlimah
@mnakalay your assistance today was highly appreciated, you don't always find somebody who is willing to help a total stranger so thank you very much, as for my colleague i think there may have been some sort of a misunderstanding since he is not familiar with this forum, I apologize on his behalf if he have offended you and i will surly take it up with him

Thank you again for your help.
piyushsoft replied on at Permalink Reply
Dear mnakalay,

thank you very much for your help , we can't provide our server access to anyone becoz of some security issue.

i did not apply your logic to fix our issue, there are some back-end issue(database).