• Resolved korynorthrop

    (@korynorthrop)


    I am helping a client with their website, which utilizes the Quiz Master Next plugin. I’ve recently updated WordPress to 6.3 and their PHP version to 8.1.22. We are using the Twenty Twelve theme. All plugins are updated as well. However, if the QSM plugin is active, going to any wp-admin page shows the error, “There has been a critical error on this website. Please check your site admin email inbox for instructions.” I checked our PHP error logs and see these errors:

    PHP Warning:  Undefined array key "pages" in /.../wp-content/plugins/quiz-master-next/php/template-variables.php on line 386
    
    PHP Warning:  Undefined array key "correct_answer_logic" in /.../wp-content/plugins/quiz-master-next/php/classes/class-qmn-quiz-manager.php on line 451
    
    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/twentytwelve/page.php'), get_template_part, locate_template, load_template, require('/themes/twentytwelve/content-page.php'), the_content, apply_filters('the_content'), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, QMNQuizManager->display_shortcode
    

    I’ve tried tackling those first two PHP warnings by editing the plugin code to include isset() statements. I commented out the three instances I found SELECT quiz_id within the QSM plugin and replaced them with empty arrays so as to not generate more errors, which was in three files:
    – quiz-master-next/php/rest-api.php
    – quiz-master-next/admin/options-page-questions-tab.php
    – quiz-master-next/classes/class-qmn-quiz-manager.php

    However, no matter what I try I cannot access any WP admin pages when QSM is active. The front-end of the site works fine though when it’s active.

Viewing 2 replies - 16 through 17 (of 17 total)
  • Dear @korynorthrop ,

    Thank you for sharing debug log with us.

    Let me discuss this with our technical team.

    I will keep you posted with further updates soon.

    Regards,
    Sumit

    Dear @korynorthrop

    On the basis of debug.log warnings you have to add the below-given code in the below-given path.

    File Path ? quiz-master-next\php\classes\class-qmn-plugin-helper.php

    Code? isset( $qsm_contact[‘type’] ) && ‘date’ === $qsm_contact[‘type’] && null !== $GLOBALS[‘qsm_date_format’]

    Let me know if this code fix the warnings or not.

    Looking forward to your reply.

    Regards,
    Sumit

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘QSM causing critical error’ is closed to new replies.