Error on submission of survey
-
Hi
I’ve just installed the plugin and set up my first survey http://www.movebeyond.net/business-coaching/cm-connected-business-development-survey/, but I get the following error message at the end:
Warning: Invalid argument supplied for foreach() in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 226
Fatal error: Call to a member function get_results() on a non-object in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 62
As far as I can tell I’ve set everything up correctly. I’ve added email addresses to the options page, set up and enabled the quiz, entered two sections and put one question in each section.
Please can you tell me what I need to do to fix this. Thanks,
Kyle
-
Just taken your quiz (under the name of Ollie Armstrong in case you want to delete that result) and I see the error. Looking into it now.
Can you just tell me the options you have set in the quiz edit page? I need to try to reproduce this.
If you don’t mind providing me access to your dashboard then that would make it easier. If you want to email the username/password to M8R-pe0wo21@mailinator.com and I’ll take a look.
Ollie
Hi Ollie,
Thanks for the update. The results aren’t currently saving so no need to delete it. I assume as a result of the error.
Let me know if you need a login to access my dashboard or any further info.
Kyle
If you don’t mind providing me access to your dashboard then that would make it easier. If you want to email the username/password to M8R-pe0wo21@mailinator.com and I’ll take a look.
Ollie
Did you get my email Ollie? Any progress?
Hi Ollie,
I am getting the same Fatal Error as Kyle but not the shortcode error.Fatal error: Call to a member function get_results() on a non-object in /home/socialm/public_html/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 62
Do you need to login to my Dashboard too or is there an update to address this?
This is the perfect solution for my needs just cant get past the Fatal Error above!
Thanks!
AceOfJames
Good to hear I’m not the only one James. I too hope there’s a solution coming soon as I really need to launch my survey this week and don’t want to have to resort to switching to another plugin.
Kyle
Hi Kyle,
I have a similar situation and need it working asap! It is one of the better survey, quiz scripts I have found though! Let’s cross our fingers!AceOfJames
Hi guys, I am taking a look at this now. It would seem that the wpdb global is not being declared so if you can open the file that the fatal error is referencing and then add the line:
global $wpdb;
just under line 19 hopefully that will fix it.Cheers,
OllieHi Ollie,
Thanks worked and I got:Thank you for completing our survey!
However, it is not saving to the database and the REQUIRED fields selected during setup of the questions failed. There were red asterix’s by the required questions but you could leave them blank and the test would go through and not save.
Thanks for the first fix! What about this one? 😉
Thanks for the help!
AceOfJames
Are you sure its not saving? I don’t see why it shouldn’t as it does on my test server. Could you open up your
wp-config.php
file and at the bottom change thewp_debug
from false totrue
and tell me any errors you get at any point during the quiz.Cheers
Didn’t work for me Ollie, actually I now get the first error also appear on the second question of the quiz.
Kyle
Kylen,
You say you added email addresses to the options page? Could you try with just one email address? I think I may have forgotten to test multiple email addresses and it would explain the errors.
Update: I just added a second email address and it still won’t give me the errors you get. Could you grab a screenshot of the quiz options page for me please?
Cheers,
OllieApologies, I separated the errors in the wrong place on the previous post. This is correct.
Debug errors after question 1:
Notice: Undefined index: questions in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 226
Warning: Invalid argument supplied for foreach() in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 226
Notice: Undefined index: id in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 235
Notice: Undefined index: type in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 237
Notice: Undefined index: type in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 238Debug errors after question 2 (last question, so I assume completion of survey:
Notice: Undefined index: questions in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 226
Warning: Invalid argument supplied for foreach() in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 226
Notice: Undefined index: id in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 235
Notice: Undefined index: type in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 237
Notice: Undefined index: type in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 238
Notice: Undefined variable: wpdb in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 54
Notice: Trying to get property of non-object in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 54
Notice: Undefined variable: wpdb in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 58
Notice: Trying to get property of non-object in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 58
Notice: Undefined variable: wpdb in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 63
Fatal error: Call to a member function get_results() on a non-object in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 63
Right, did you definitely place the
global $wpdb;
line in the correct place? Thelib/Wpsqt/Mail.php
file should look exactly like this http://pastebin.com/ewEuux1S.Can you double check this please? It should have solved this issues.
Ollie
I went through the whole quiz without selecting anything and was not stopped then on the final page this is the error:
WordPress database error: [Unknown column ‘datetaken’ in ‘field list’]
INSERT INTOwp_wpsqt_all_results
(datetaken,timetaken,person,sections,item_id,person_name,ipaddress,score,total,percentage,status,pass) VALUES (‘1313398090.8′,20,’a:0:{}’,’a:3:{i:0;a:8:{s:2:\”id\”;s:1:\”1\”;s:7:\”item_id\”;s:1:\”1\”;s:4:\”name\”;s:11:\”Section – A\”;s:5:\”limit\”;s:1:\”0\”;s:5:\”order\”;s:6:\”random\”;s:10:\”difficulty\”;s:4:\”easy\”;s:9:\”timestamp\”;s:19:\”2011-08-12 21:25:54\”;s:9:\”questions\”;a:1:{i:0;a:16:{s:2:\”id\”;s:1:\”1\”;s:4:\”name\”;s:34:\”What is the Capitol of California?\”;s:4:\”type\”;s:6:\”Single\”;s:7:\”item_id\”;s:1:\”1\”;s:10:\”section_id\”;s:1:\”1\”;s:10:\”difficulty\”;s:4:\”Easy\”;s:9:\”timestamp\”;s:19:\”2011-08-07 03:47:23\”;s:7:\”answers\”;a:3:{i:0;a:3:{s:4:\”text\”;s:10:\”Santa Cruz\”;s:7:\”correct\”;s:2:\”no\”;s:7:\”default\”;s:2:\”no\”;}i:1;a:3:{s:4:\”text\”;s:10:\”Sacramento\”;s:7:\”correct\”;s:3:\”yes\”;s:7:\”default\”;s:2:\”no\”;}i:2;a:3:{s:4:\”text\”;s:13:\”San Francisco\”;s:7:\”correct\”;s:2:\”no\”;s:7:\”default\”;s:2:\”no\”;}}s:6:\”points\”;s:1:\”1\”;s:8:\”required\”;s:3:\”yes\”;s:8:\”add_text\”;s:0:\”\”;s:5:\”image\”;s:312:\”<img src=\\\”http://santacruzsocialmedia.com/facepress/wp-content/uploads/2011/08/California-Map.png\\\” alt=\\\”\\\” title=\\\”California Map\\\” width=\\\”250\\\” height=\\\”225\\\” class=\\\”alignnone size-full wp-image-12\\\” />\”;s:13:\”multiple_name\”;a:3:{i:0;s:10:\”Santa Cruz\”;i:1;s:10:\”Sacramento\”;i:2;s:13:\”San Francisco\”;}s:16:\”multiple_correct\”;a:1:{i:1;s:3:\”yes\”;}s:4:\”hint\”;s:0:\”\”;s:4:\”Save\”;s:13:\”Save Question\”;}}}i:1;a:8:{s:2:\”id\”;s:1:\”2\”;s:7:\”item_id\”;s:1:\”1\”;s:4:\”name\”;s:11:\”Section – B\”;s:5:\”limit\”;s:1:\”0\”;s:5:\”order\”;s:6:\”random\”;s:10:\”difficulty\”;s:6:\”medium\”;s:9:\”timestamp\”;s:19:\”2011-08-12 21:25:54\”;s:9:\”questions\”;a:2:{i:0;a:16:{s:2:\”id\”;s:1:\”2\”;s:4:\”name\”;s:65:\”What California Governor won the Presidency of The United States?\”;s:4:\”type\”;s:6:\”Single\”;s:7:\”item_id\”;s:1:\”1\”;s:10:\”section_id\”;s:1:\”2\”;s:10:\”difficulty\”;s:4:\”Easy\”;s:9:\”timestamp\”;s:19:\”2011-08-07 03:28:41\”;s:7:\”answers\”;a:3:{i:0;a:3:{s:4:\”text\”;s:13:\”Ronald Reagan\”;s:7:\”correct\”;s:3:\”yes\”;s:7:\”default\”;s:2:\”no\”;}i:1;a:3:{s:4:\”text\”;s:11:\”Jerry Brown\”;s:7:\”correct\”;s:2:\”no\”;s:7:\”default\”;s:2:\”no\”;}i:2;a:3:{s:4:\”text\”;s:22:\”Arnold Schwartzenegger\”;s:7:\”correct\”;s:2:\”no\”;s:7:\”default\”;s:2:\”no\”;}}s:6:\”points\”;s:1:\”2\”;s:8:\”required\”;s:3:\”yes\”;s:8:\”add_text\”;s:0:\”\”;s:5:\”image\”;s:0:\”\”;s:13:\”multiple_name\”;a:3:{i:0;s:13:\”Ronald Reagan\”;i:1;s:11:\”Jerry Brown\”;i:2;s:22:\”Arnold Schwartzenegger\”;}s:16:\”multiple_correct\”;a:1:{i:0;s:3:\”yes\”;}s:4:\”hint\”;s:0:\”\”;s:4:\”Save\”;s:13:\”Save Question\”;}i:1;a:16:{s:2:\”id\”;s:1:\”3\”;s:4:\”name\”;s:71:\”Where was the epicenter for the 1989 earthquake in Northern California?\”;s:4:\”type\”;s:6:\”Single\”;s:7:\”item_id\”;s:1:\”1\”;s:10:\”section_id\”;s:1:\”2\”;s:10:\”difficulty\”;s:6:\”Medium\”;s:9:\”timestamp\”;s:19:\”2011-08-07 03:28:52\”;s:7:\”answers\”;a:3:{i:0;a:3:{s:4:\”text\”;s:22:\”San Andreas Fault Line\”;s:7:\”correct\”;s:2:\”no\”;s:7:\”default\”;s:2:\”no\”;}i:1;a:3:{s:4:\”text\”;s:10:\”San Ysidro\”;s:7:\”correct\”;s:2:\”no\”;s:7:\”default\”;s:2:\”no\”;}i:2;a:3:{s:4:\”text\”;s:11:\”Loma Prieta\”;s:7:\”correct\”;s:3:\”yes\”;s:7:\”default\”;s:2:\”no\”;}}s:6:\”points\”;s:1:\”1\”;s:8:\”required\”;s:3:\”yes\”;s:8:\”add_text\”;s:0:\”\”;s:5:\”image\”;s:0:\”\”;s:13:\”multiple_name\”;a:3:{i:0;s:22:\”San Andreas Fault Line\”;i:1;s:10:\”San Ysidro\”;i:2;s:11:\”Loma Prieta\”;}s:16:\”multiple_correct\”;a:1:{i:2;s:3:\”yes\”;}s:4:\”hint\”;s:0:\”\”;s:4:\”Save\”;s:13:\”Save Question\”;}}}i:2;a:8:{s:2:\”id\”;s:1:\”3\”;s:7:\”item_id\”;s:1:\”1\”;s:4:\”name\”;s:11:\”Section – C\”;s:5:\”limit\”;s:1:\”0\”;s:5:\”order\”;s:6:\”random\”;s:10:\”difficulty\”;s:6:\”medium\”;s:9:\”timestamp\”;s:19:\”2011-08-12 21:25:54\”;s:9:\”questions\”;a:3:{i:0;a:16:{s:2:\”id\”;s:1:\”4\”;s:4:\”name\”;s:46:\”Who is the 2nd President of The United States?\”;s:4:\”type\”;s:6:\”Single\”;s:7:\”item_id\”;s:1:\”1\”;s:10:\”section_id\”;s:1:\”3\”;s:10:\”difficulty\”;s:6:\”Medium\”;s:9:\”timestamp\”;s:19:\”2011-08-07 03:30:50\”;s:7:\”answers\”;a:4:{i:0;a:3:{s:4:\”text\”;s:12:\”Barack Obama\”;s:7:\”correct\”;s:2:\”no\”;s:7:\”default\”;s:2:\”no\”;}i:1;a:3:{s:4:\”text\”;s:17:\”George Washington\”;s:7:\”correct\”;s:2:\”no\”;s:7:\”default\”;s:2:\”no\”;}i:2;a:3:{s:4:\”text\”;s:10:\”John Adams\”;s:7:\”correct\”;s:3:\”yes\”;s:7:\”default\”;s:2:\”no\”;}i:3;a:3:{s:4:\”text\”;s:11:\”Angus Young\”;s:7:\”correct\”;s:2:\”no\”;s:7:\”default\”;s:2:\”no\”;}}s:6:\”points\”;s:1:\”1\”;s:8:\”required\”;s:3:\”yes\”;s:8:\”add_text\”;s:0:\”\”;s:5:\”image\”;s:0:\”\”;s:13:\”multiple_name\”;a:4:{i:0;s:12:\”Barack Obama\”;i:1;s:17:\”George Washington\”;i:2;s:10:\”John Adams\”;i:3;s:11:\”Angus Young\”;}s:16:\”multiple_correct\”;a:1:{i:2;s:3:\”yes\”;}s:4:\”hint\”;s:0:\”\”;s:4:\”Save\”;s:13:\”Save Question\”;}i:1;a:16:{s:2:\”id\”;s:1:\”5\”;s:4:\”name\”;s:54:\”What bands drummer is dead but his name is Keith Moon?\”;s:4:\”type\”;s:6:\”Single\”;s:7:\”item_id\”;s:1:\”1\”;s:10:\”section_id\”;s:1:\”3\”;s:10:\”difficulty\”;s:6:\”Medium\”;s:9:\”timestamp\”;s:19:\”2011-08-07 03:32:36\”;s:7:\”answers\”;a:4:{i:0;a:3:{s:4:\”text\”;s:4:\”Rush\”;s:7:\”correct\”;s:2:\”no\”;s:7:\”default\”;s:2:\”no\”;}i:1;a:3:{s:4:\”text\”;s:12:\”Led Zeppelin\”;s:7:\”correct\”;s:2:\”no\”;s:7:\”default\”;s:2:\”no\”;}i:2;a:3:{s:4:\”text\”;s:7:\”The Who\”;s:7:\”correct\”;s:3:\”yes\”;s:7:\”default\”;s:2:\”no\”;}i:3;a:3:{s:4:\”text\”;s:10:\”Thin Lizzy\”;s:7:\”correct\”;s:2:\”no\”;s:7:\”default\”;s:2:\”no\”;}}s:6:\”points\”;s:1:\”4\”;s:8:\”required\”;s:3:\”yes\”;s:8:\”add_text\”;s:0:\”\”;s:5:\”image\”;s:0:\”\”;s:13:\”multiple_name\”;a:4:{i:0;s:4:\”Rush\”;i:1;s:12:\”Led Zeppelin\”;i:2;s:7:\”The Who\”;i:3;s:10:\”Thin Lizzy\”;}s:16:\”multiple_correct\”;a:1:{i:2;s:3:\”yes\”;}s:4:\”hint\”;s:0:\”\”;s:4:\”Save\”;s:13:\”Save Question\”;}i:2;a:16:{s:2:\”id\”;s:1:\”6\”;s:4:\”name\”;s:58:\”What two teams played in the 1989 Word Series of Baseball?\”;s:4:\”type\”;s:6:\”Single\”;s:7:\”item_id\”;s:1:\”1\”;s:10:\”section_id\”;s:1:\”3\”;s:10:\”difficulty\”;s:6:\”Medium\”;s:9:\”timestamp\”;s:19:\”2011-08-07 03:39:45\”;s:7:\”answers\”;a:4:{i:0;a:3:{s:4:\”text\”;s:12:\”A\’s and Cubs\”;s:7:\”correct\”;s:2:\”no\”;s:7:\”default\”;s:2:\”no\”;}i:1;a:3:{s:4:\”text\”;s:19:\”Giant\’s and Dodgers\”;s:7:\”correct\”;s:2:\”no\”;s:7:\”default\”;s:2:\”no\”;}i:2;a:3:{s:4:\”text\”;s:19:\”Yankees and Red Sox\”;s:7:\”correct\”;s:2:\”no\”;s:7:\”default\”;s:2:\”no\”;}i:3;a:3:{s:4:\”text\”;s:15:\”Giant\’s and A\’s\”;s:7:\”correct\”;s:3:\”yes\”;s:7:\”default\”;s:2:\”no\”;}}s:6:\”points\”;s:1:\”2\”;s:8:\”required\”;s:3:\”yes\”;s:8:\”add_text\”;s:0:\”\”;s:5:\”image\”;s:0:\”\”;s:13:\”multiple_name\”;a:4:{i:0;s:13:\”A\\\’s and Cubs\”;i:1;s:20:\”Giant\\\’s and Dodgers\”;i:2;s:19:\”Yankees and Red Sox\”;i:3;s:17:\”Giant\\\’s and A\\\’s\”;}s:16:\”multiple_correct\”;a:1:{i:3;s:3:\”yes\”;}s:4:\”hint\”;s:0:\”\”;s:4:\”Save\”;s:13:\”Save Question\”;}}}}’,1,’Anonymous’,’99.173.25.168′,0,0,0,’unviewed’,0)Notice: Undefined index: email in /home/socialm/public_html/facepress/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 73
- The topic ‘Error on submission of survey’ is closed to new replies.