I have the same issue running on a Drupal 7.97 and PHP 8.2.23.
The error I'm getting in the console of Chrome as well as in Edge.
Refused to apply style from "mysite.com/system/files/honeypot/honeypot.css?sjnqlb' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled."
Thank you,
I applied this patch https://www.drupal.org/files/issues/2022-06-01/2615496-83.patch → since my D7 is running on PHP 7.4 and MySql 5.7 but I still have the following errors while running drush updatedb
[code]
Cannot add unique key result_answer to table quiz_node_results_answers: unique key already exists. [error]
Performed update: quiz_update_7501 [ok]
Cannot add field quiz_long_answer_user_answers.result_answer_id: field already exists. [error]
Performed update: long_answer_update_7500 [ok]
SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one [error]
auto column and it must be defined as a key
Performed update: truefalse_update_7500 [ok]
Cannot add field quiz_short_answer_user_answers.result_answer_id: field already exists. [error]
Performed update: short_answer_update_7500 [ok]
Cannot add field quiz_multichoice_user_answers.result_answer_id: field already exists. [error]
Performed update: multichoice_update_7502 [ok]
Cannot add field quiz_matching_user_answers.result_answer_id: field already exists. [error]
Performed update: matching_update_7501 [ok]
'all' cache was cleared. [success]
Finished performing updates. [ok]
[/code]
Could you please help me? as I do not know what else to do.
Thank you for your answer.
I installed them all with drush en quiz and then I answered yes for the dependencies....
It went all fine in drush, but when I tried to use the module I got the following error:
"Error message
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.qnp_id' in 'field list': SELECT base.qnp_id AS qnp_id, base.vid AS vid, base.nid AS nid, base.uid AS uid, base.number_of_random_questions AS number_of_random_questions, base.max_score_for_random AS max_score_for_random, base.pass_rate AS pass_rate, base.summary_pass AS summary_pass, base.summary_pass_format AS summary_pass_format, base.summary_default AS summary_default, base.summary_default_format AS summary_default_format, base.randomization AS randomization, base.backwards_navigation AS backwards_navigation, base.keep_results AS keep_results, base.repeat_until_correct AS repeat_until_correct, base.quiz_open AS quiz_open, base.quiz_close AS quiz_close, base.takes AS takes, base.show_attempt_stats AS show_attempt_stats, base.time_limit AS time_limit, base.quiz_always AS quiz_always, base.time_left AS time_left, base.max_score AS max_score, base.allow_skipping AS allow_skipping, base.allow_resume AS allow_resume, base.allow_jumping AS allow_jumping, base.allow_change AS allow_change, base.allow_change_blank AS allow_change_blank, base.build_on_last AS build_on_last, base.show_passed AS show_passed, base.mark_doubtful AS mark_doubtful, base.review_options AS review_options, base.result_type AS result_type FROM {quiz_node_properties} base WHERE (base.vid IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => 4858 ) in EntityAPIController->query() (line 193 of /home/customer/www/test.domain.com/public_html/sites/all/modules/entity/includes/entity.controller.inc).
The website encountered an unexpected error. Please try again later.
"
This might be due to the failed update.php SQL scripts while upgrading quiz
The following updates returned messages
quiz module
Update #7501
Failed: DatabaseSchemaObjectExistsException: Cannot add unique key result_answer to table quiz_node_results_answers: unique key already exists. in DatabaseSchema_mysql->addUniqueKey() (line 430 of /home/customer/www/test.learnro.com/public_html/includes/database/mysql/schema.inc).
quiz_question module
Update #7500
Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1171 All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead: ALTER TABLE {quiz_question_properties} ADD `qqp_id` INT NULL auto_increment DEFAULT NULL, ADD PRIMARY KEY (`qqp_id`); Array ( ) in db_add_field() (line 2977 of /home/customer/www/test.learnro.com/public_html/includes/database/database.inc).
long_answer module
Update #7500
Failed: DatabaseSchemaObjectExistsException: Cannot add field quiz_long_answer_user_answers.result_answer_id: field already exists. in DatabaseSchema_mysql->addField() (line 341 of /home/customer/www/test.learnro.com/public_html/includes/database/mysql/schema.inc).
truefalse module
Update #7500
Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1171 All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead: ALTER TABLE {quiz_truefalse_user_answers} ADD `answer_id` INT NULL auto_increment DEFAULT NULL, ADD PRIMARY KEY (`answer_id`); Array ( ) in db_add_field() (line 2977 of /home/customer/www/test.learnro.com/public_html/includes/database/database.inc).
short_answer module
Update #7500
Failed: DatabaseSchemaObjectExistsException: Cannot add field quiz_short_answer_user_answers.result_answer_id: field already exists. in DatabaseSchema_mysql->addField() (line 341 of /home/customer/www/test.learnro.com/public_html/includes/database/mysql/schema.inc).
multichoice module
Update #7502
Failed: DatabaseSchemaObjectExistsException: Cannot add field quiz_multichoice_user_answers.result_answer_id: field already exists. in DatabaseSchema_mysql->addField() (line 341 of /home/customer/www/test.learnro.com/public_html/includes/database/mysql/schema.inc).
matching module
Update #7501
Failed: DatabaseSchemaObjectExistsException: Cannot add field quiz_matching_user_answers.result_answer_id: field already exists. in DatabaseSchema_mysql->addField() (line 341 of /home/customer/www/test.learnro.com/public_html/includes/database/mysql/schema.inc).