by Kristi M.
Hello,
I am having the exact same problem when upgrading from Moodle 2.3 to either 2.4 or 2.5. There are two courses that I can no longer access, though the do appear to be in the database.
I tried the SQL query Tim suggested and only had the one row returned with contextlevel = 10 so it isn't the same issue, just similar. Can someone please help me find the proper SQL query I need to find the error?
Here is the stack trace for one of the courses:
Can not find data record in database table course.
Debug info: SELECT id,category FROM {course} WHERE id = ?
[array (
0 => '4',
)]
Error code: invalidrecord
[array (
0 => '4',
)]
Error code: invalidrecord
Stack trace:
- line 1372 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
- line 1348 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
- line 6576 of /lib/accesslib.php: call to moodle_database->get_record()
- line 124 of /blocks/course_list/block_course_list.php: call to context_course::instance()
- line 51 of /blocks/course_list/block_course_list.php: call to block_course_list->get_remote_courses()
- line 764 of /blocks/moodleblock.class.php: call to block_course_list->get_content()
- line 238 of /blocks/moodleblock.class.php: call to block_list->formatted_contents()
- line 951 of /lib/blocklib.php: call to block_base->get_content_for_output()
- line 1003 of /lib/blocklib.php: call to block_manager->create_block_contents()
- line 353 of /lib/blocklib.php: call to block_manager->ensure_content_created()
- line 6 of /theme/ascend_tablet/layout/general.php: call to block_manager->region_has_content()
- line 847 of /lib/outputrenderers.php: call to include()
- line 777 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
- line 240 of /course/view.php: call to core_renderer->header()