-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.1.6
-
None
Thank you for the correction in the MDL-79073.
I tested your fix on my environment yesterday in preparation of the next migration.
It worked for a few records but after fixing some question_categories, I unfortunately had the same issue.
Here are the logs I got:
== Checking for orphaned categories == |
Found orphaned category: Défaut pour test diff |
Cleaning...!!! Impossible de trouver l'enregistrement de données dans la table context de la base de données. !!! |
!! SELECT * FROM {context} WHERE id = ? |
[array ( |
0 => '8040805', |
)] |
Error code: invalidrecord !! |
!! Stack trace: * line 1654 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown |
* line 1630 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select() |
* line 5429 of /lib/accesslib.php: call to moodle_database->get_record() |
* line 751 of /lib/questionlib.php: call to context::instance_by_id() |
* line 522 of /lib/questionlib.php: call to question_move_questions_to_category() |
* line 272 of /lib/questionlib.php: call to question_save_from_deletion() |
* line 87 of /admin/cli/fix_orphaned_question_categories.php: call to question_category_delete_safe() |
!! |
I tried to execute this following command line:
php admin/cli/fix_orphaned_question_categories.php --fix |
- is a clone of
-
MDL-79073 fix_orphaned_question_categories.php --fix trigger an exception
-
- Closed
-