Plugin errors
-
Since the earlier update in August I have been having problems with the plugin. All completed quizzes were not being added up correctly. All scores were 0. I went through all of my plugins and made sure everything on my site was up to date, but continued to have errors. Now it is not even adding anything, but giving me a critical error. These are the error messages I am getting from your plugin:
str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated
All error messages go away when I deactivate your plugin.
-
Hello @eclhome ,
I trust you had a wonderful weekend.
Thank you for getting in touch with us.
For us to better understand the issue you’re experiencing, it would be greatly appreciated if you could share a screen recording that highlights the problem. Additionally, please provide a debug log screenshot related to the issue. This will enable us to investigate the matter thoroughly and provide you with the most suitable solution.
Looking forward to hearing from you.
Warm regards,
SumitDeprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home2/canad/public_html/eclectic-homeschool.com/wp-includes/functions.php on line 2182
Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home2/canad/public_html/eclectic-homeschool.com/wp-includes/functions.php on line 7127
Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home2/canad/public_html/eclectic-homeschool.com/wp-includes/functions.php on line 2182
Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home2/canad/public_html/eclectic-homeschool.com/wp-includes/functions.php on line 7127
Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home2/canad/public_html/eclectic-homeschool.com/wp-includes/functions.php on line 2182
Warning: Cannot modify header information – headers already sent by (output started at /home2/canad/public_html/eclectic-homeschool.com/wp-includes/functions.php:7127) in /home2/canad/public_html/eclectic-homeschool.com/wp-admin/includes/misc.php on line 1431
Warning: Cannot modify header information – headers already sent by (output started at /home2/canad/public_html/eclectic-homeschool.com/wp-includes/functions.php:7127) in /home2/canad/public_html/eclectic-homeschool.com/wp-includes/functions.php on line 6935
Warning: Cannot modify header information – headers already sent by (output started at /home2/canad/public_html/eclectic-homeschool.com/wp-includes/functions.php:7127) in /home2/canad/public_html/eclectic-homeschool.com/wp-admin/admin-header.php on line 9
WarningCannot modify header information – headers already sent by (output started at /home2/canad/public_html/eclectic-homeschool.com/wp-includes/functions.php:7127)+
- wp-admin/includes/misc.php:1431
1WordPress CoreWarningCannot modify header information – headers already sent by (output started at /home2/canad/public_html/eclectic-homeschool.com/wp-includes/functions.php:7127)+
- wp-includes/functions.php:6935
1WordPress CoreWarningCannot modify header information – headers already sent by (output started at /home2/canad/public_html/eclectic-homeschool.com/wp-includes/functions.php:7127)+
- wp-admin/admin-header.php:9
1WordPress CoreDeprecatedstrpos(): Passing null to parameter #1 ($haystack) of type string is deprecated+
- wp-includes/functions.php:7127
3Plugin: quiz-master-nextDeprecatedstr_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated+
- wp-includes/functions.php:2182
3Plugin: quiz-master-next
Query master says this when I try to submit a quiz:
Fatal error: Uncaught Error: count(): Argument #1 ($value) must be of type Countable|array, string given
in /home2/canad/public_html/eclectic-homeschool.com/wp-content/plugins/quiz-master-next/php/classes/class-qmn-quiz-manager.php on line 1968Call stack:
QMNQuizManager::check_answers()
wp-content/plugins/quiz-master-next/php/classes/class-qmn-quiz-manager.php:1694QMNQuizManager::submit_results()
wp-content/plugins/quiz-master-next/php/classes/class-qmn-quiz-manager.php:1600QMNQuizManager::ajax_submit_results()
wp-includes/class-wp-hook.php:310WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:334WP_Hook::do_action()
wp-includes/plugin.php:517do_action()
wp-admin/admin-ajax.php:188
Query Monitor
Hello @eclhome ,
I hope this message finds you well.
We’ve noticed that you’re experiencing some deprecated warnings, and we’d like to assist you in resolving this issue. To do so, we kindly request the following information:
- Your Quiz and Survey Master (QSM) version.
- Your WordPress version.
- Your PHP version.
Furthermore, if you could kindly provide us with a list of the plugins you have installed, it would be incredibly helpful. This information will allow us to replicate your environment on our local server, making it easier to pinpoint and resolve the issue.
We recommend considering a lower PHP version to help eliminate those deprecated warnings. However, please don’t hesitate to reach out to us if you need any guidance on how to do this.
Please feel free to share the requested information at your earliest convenience.
Best regards,
SumitWordPress version: 6.3.1
PHP: Currently 8.2 but I have tried 8.1, 8.0, 7.4, and 7.3 and the quizzes did not work.
Quiz and Survey Master version: 8.1.16
Current list of plugins, all are updated: Quiz and Survey Master, Cryout Serious Theme Settings, Query Monitor, WP Debugging, WP Rollback
Dear @eclhome ,
We wanted to inform you that our dedicated technical team is actively addressing the issue you have reported.
Rest assured, we are committed to providing you with timely updates on the progress made in resolving this matter.
Thank you for your patience and understanding.
Warm regards,
SumitHello @eclhome ,
We have tested the QSM on our staging website with the same configuration provided by you and found that in PHP version 8.2 and 8.1 it is showing deprecated error but when we lower down the version to 8.0 then these warnings disappears so I request you to please downgrade the PHP version to 8.0 and then check.
Here is the screencast link for your reference.
https://www.awesomescreenshot.com/video/21262831?key=dcd4d3431b84d29a35f911221a312938
Let me know if you need more help.
Regards,
SumitThank you, but I am still getting errors. I even tried changing my theme and it is still not working.
WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘)’ at line 3 for query SELECT quiz_id, question_id, answer_array, question_answer_info, question_type_new, question_settings FROM wp_mlw_questions WHERE question_id IN () made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/orton-blog/single.php’), get_template_part, locate_template, load_template, require(‘/themes/orton-blog/template-parts/content-single.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, QMNQuizManager->display_shortcode, QM_DB->query
[06-Oct-2023 02:39:48 UTC] PHP Fatal error Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in /home2/canad/public_html/eclectic-homeschool.com/wp-content/plugins/quiz-master-next/php/classes/class-qmn-quiz-manager.php:1968
Dear @eclhome ,
Thank you for sharing the error message with us.
Let me discuss this with our technical team. I will keep you posted with further updates soon.
Regards,
SumitHello @eclhome ,
I request you to please follow the below-given stpes and then test your website.
- Open file wp-content\plugins\quiz-master-next\php\classes\class-qmn-quiz-manager.php
- On line number from 484 to 487
- Replace the below-given code block on given lines in given file.
$question_array = $wpdb->get_results( $wpdb->prepare( "SELECT quiz_id, question_id, answer_array, question_answer_info, question_type_new, question_settings FROM {$wpdb->prefix}mlw_questions WHERE IF('%s' = '', 1, question_id IN (%s))", $enc_questions, $enc_questions ), ARRAY_A );Let me know if you need more help on this issue.
Regards,
SumitThank you. I was able to get the results to show up with that code and the PHP changed to 7.4. But it is still not adding up the scores. It gives all results as 0. These are the current errors.
[07-Oct-2023 06:31:23 UTC] PHP Warning count(): Parameter must be an array or an object that implements Countable in /home2/canad/public_html/eclectic-homeschool.com/wp-content/plugins/quiz-master-next/php/classes/class-qmn-quiz-manager.php on line 1973
[07-Oct-2023 06:31:23 UTC] PHP Warning Invalid argument supplied for foreach() in /home2/canad/public_html/eclectic-homeschool.com/wp-content/plugins/quiz-master-next/php/classes/class-qmn-quiz-manager.php on line 1975
Dear @eclhome ,
Can you please update QSM to latest version and then check.
Please let me know if you still facing the same issue.
Looking forward to your reply.
Regards,
Sumit
The topic ‘Plugin errors’ is closed to new replies.