We recently upgraded from Moodle 3.5.3 to Moodle 3.5.5 (Build: 20190311) and implemented the Adaptable theme. Since upgrading to 3.5.5, we have been encountering this error when restoring some, but not all of our courses:
We know that the problem is not theme related because we have tried both More and Clean with the same results. We have uninstalled the blog plugins, since they don't appear to be supported any more and no one at our institution is using them; we have also disabled the blog settings in Site Admin:
When we restore with debugging turned on, we get the following:
- line 3594 of /lib/deprecatedlib.php: call to debugging()
- line 3872 of /lib/deprecatedlib.php: call to events_dispatch()
- line 839 of /lib/classes/event/base.php: call to events_trigger_legacy()
- line 4925 of /lib/moodlelib.php: call to core\event\base->trigger()
- line 238 of /backup/util/ui/restore_ui.class.php: call to delete_course()
- line 144 of /backup/restore.php: call to restore_ui->cleanup()
Coding error detected, it must be fixed by a programmer: Capability 'moodle/blog:associatemodule' was not found! This has to be fixed in code.
Error code: codingerror
- line 1314 of /lib/accesslib.php: coding_exception thrown
- line 2098 of /backup/moodle2/restore_stepslib.php: call to assign_capability()
- line 137 of /backup/util/plan/restore_structure_step.class.php: call to restore_ras_and_caps_structure_step->process_override()
- line 112 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
- line 178 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
- line 100 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
- line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()
- line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
- line 190 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
- line 278 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
- line ? of unknownfile: call to progressive_parser->end_tag()
- line 179 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
- line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
- line 110 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
- line 181 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
- line 210 of /backup/moodle2/restore_activity_task.class.php: call to base_task->execute()
- line 178 of /backup/util/plan/base_plan.class.php: call to restore_activity_task->execute()
- line 168 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
- line 339 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
- line 224 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
- line 135 of /backup/restore.php: call to restore_ui->execute()
We have access to a basic (unconfigured) 3.7 Moodle instance and have been able to restore at least one course there, back it up, then successfully restore it without user data on our 3.5.5 site. There are privacy issues related to using the 3.7 site along with the logistics of having to do this with multiple courses.
Any help would be greatly appreciated.