Can not find data record in database table course.

Can not find data record in database table course.

by Jimbo Jones -
Number of replies: 1

Hi all,


A user clicked on a calendar entry yesterday which has for some unknown reason, rendered access to a course broken. It was working before following the link via calendar entry. Here is a stack trace, it appears to be referencing a course ID of 0;


Debug info: SELECT id,category FROM {course} WHERE id = ?
[array (
0 => '0',
)]
Error code: invalidrecord
Stack trace:
  • line 1546 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
  • line 1522 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
  • line 6556 of /lib/accesslib.php: call to moodle_database->get_record()
  • line 297 of /calendar/classes/external/event_exporter_base.php: call to context_course::instance()
  • line 94 of /calendar/classes/external/calendar_event_exporter.php: call to core_calendar\external\event_exporter_base->get_other_values()
  • line 125 of /lib/classes/external/exporter.php: call to core_calendar\external\calendar_event_exporter->get_other_values()
  • line 126 of /calendar/classes/external/calendar_upcoming_exporter.php: call to core\external\exporter->export()
  • line ? of unknownfile: call to core_calendar\external\calendar_upcoming_exporter->core_calendar\external\{closure}()
  • line 134 of /calendar/classes/external/calendar_upcoming_exporter.php: call to array_map()
  • line 125 of /lib/classes/external/exporter.php: call to core_calendar\external\calendar_upcoming_exporter->get_other_values()
  • line 3489 of /calendar/lib.php: call to core\external\exporter->export()
  • line 53 of /blocks/calendar_upcoming/block_calendar_upcoming.php: call to calendar_get_view()
  • line 288 of /blocks/moodleblock.class.php: call to block_calendar_upcoming->get_content()
  • line 230 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
  • line 1211 of /lib/blocklib.php: call to block_base->get_content_for_output()
  • line 1263 of /lib/blocklib.php: call to block_manager->create_block_contents()
  • line 374 of /lib/blocklib.php: call to block_manager->ensure_content_created()
  • line 3939 of /lib/outputrenderers.php: call to block_manager->region_has_content()
  • line 40 of /theme/boost/layout/columns2.php: call to core_renderer->blocks()
  • line 1287 of /lib/outputrenderers.php: call to include()
  • line 1217 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
  • line 244 of /course/view.php: call to core_renderer->header()

Any help would be greatly appreciated.


Running Moodle 3.5.1 (Build 20180720) on Ubuntu with Mysql Database.

Average of ratings: -