restore error (delete contents of this course then restore)

restore error (delete contents of this course then restore)

by george williams -
Number of replies: 0

Hi All, 

Moodle Version 3.9.

Hoping for some guidance. Recently did a backup of a course and I am trying to use the option to 'Delete the contents of this course and restore'. I am using the same course format on each course. Left enrolled users out. As soon as I start this process, I get the following error:

Default exception handler: Coding error detected, it must be fixed by a programmer: The theme has already been set up for this page ready for output. Therefore, you can no longer change the theme, or anything that might affect what the current theme is, for example, the course. Debug: Stack trace when the theme was set up: <ul style="text-align: left" data-rel="backtrace"><li>line 687 of \lib\pagelib.php: call to moodle_page->initialise_theme_and_output()</li><li>line 874 of \lib\pagelib.php: call to moodle_page->magic_get_theme()</li><li>line 69 of \backup\restore.php: call to moodle_page->get_renderer()</li></ul>

Error code: codingerror

* line 1921 of \lib\pagelib.php: coding_exception thrown

* line 1011 of \lib\pagelib.php: call to moodle_page->ensure_theme_not_set()

* line 3042 of \lib\moodlelib.php: call to moodle_page->set_course()

* line 3157 of \lib\moodlelib.php: call to require_login()

* line 435 of \h5p\classes\api.php: call to require_course_login()

* line 196 of \h5p\classes\api.php: call to core_h5p\api::get_pluginfile_hash()

* line 340 of \h5p\classes\api.php: call to core_h5p\api::get_content_from_pluginfile_url()

* line 53 of \contentbank\contenttype\h5p\classes\contenttype.php: call to core_h5p\api::delete_content_from_pluginfile_url()

* line 269 of \contentbank\classes\contentbank.php: call to contenttype_h5p\contenttype->delete_content()

* line 5352 of \lib\moodlelib.php: call to core_contentbank\contentbank->delete_contents()

* line 1843 of \backup\util\dbops\restore_dbops.class.php: call to remove_course_contents()

* line 372 of \backup\controller\restore_controller.class.php: call to restore_dbops::delete_course_content()

* line 219 of \backup\util\ui\restore_ui.class.php: call to restore_controller->execute_plan()

* line 143 of \backup\restore.php: call to restore_ui->execute()

Changes have been made to the original bootstrap theme (colour, logo) by previous admin\developer (I am not a programmer\developer) so I don't know if this plays a part? But the course is going from same category to same category. I have tried found out more about this error but I am drawing a blank. Any insight would be appreciated. 

Many thanks

Average of ratings: -