Course Restore Error

Course Restore Error

Hamna Faiz -
回帖数:2
Hi,
I am taking backup of course from Moodle 3.4 and restore that in Moodle 4.1, 
this error is occurring during restore
"A required parameter (contextid) was missing"
Any idea about the solution?
回复Hamna Faiz

Re: Course Restore Error

Mark Johnson -
Core developers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像

To get more information about the error, set the Debugging level to DEVELOPER and enable "Display debug messages", then try the restore again. This should give you more information about where the error is coming from, which you can post here. Turn debugging off again afterwards.

回复Mark Johnson

Re: Course Restore Error

Hamna Faiz -
In stack trace, I got these errors:
line 497 of /lib/dml/moodle_database.php: dml_write_exception thrown
line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
line 1362 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->query_end()
line 1408 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
line 1271 of /backup/util/dbops/restore_dbops.class.php: call to mysqli_native_moodle_database->insert_record()
line 1146 of /backup/moodle2/restore_stepslib.php: call to restore_dbops::create_included_users()
line 34 of /backup/util/plan/restore_execution_step.class.php: call to restore_create_included_users->define_execution()
line 181 of /backup/util/plan/base_task.class.php: call to restore_execution_step->execute()
line 191 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
line 168 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
line 408 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
line 219 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
line 146 of /backup/restore.php: call to restore_ui->execute()