Error: Can not find data record in database table course.

Error: Can not find data record in database table course.

by Jaifar Al Shizawi -
Number of replies: 3

Hi all, 


I got this error when accessing one of the courses  calendar, any help please ? 



Can not find data record in database table course.

File:

/lib/dml/moodle_database.php

Line:

1546

Stack trace:

SELECT id,category FROM {course} WHERE id = ?

[array (

  0 => '0',

)]

Error code: invalidrecord

* 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 6625 of /lib/accesslib.php: call to moodle_database->get_record()

* line 300 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 205 of /calendar/classes/external/day_exporter.php: call to core\external\exporter->export()

* line ? of unknownfile: call to core_calendar\external\day_exporter->core_calendar\external\{closure}()

* line 206 of /calendar/classes/external/day_exporter.php: call to array_map()

* line 101 of /calendar/classes/external/week_day_exporter.php: call to core_calendar\external\day_exporter->get_other_values()

* line 125 of /lib/classes/external/exporter.php: call to core_calendar\external\week_day_exporter->get_other_values()

* line 164 of /calendar/classes/external/week_exporter.php: call to core\external\exporter->export()

* line 125 of /lib/classes/external/exporter.php: call to core_calendar\external\week_exporter->get_other_values()

* line 313 of /calendar/classes/external/month_exporter.php: call to core\external\exporter->export()

* line 215 of /calendar/classes/external/month_exporter.php: call to core_calendar\external\month_exporter->get_weeks()

* line 125 of /lib/classes/external/exporter.php: call to core_calendar\external\month_exporter->get_other_values()

* line 3497 of /calendar/lib.php: call to core\external\exporter->export()

* line 1011 of /calendar/externallib.php: call to calendar_get_view()

* line 228 of /lib/externallib.php: call to core_calendar_external::get_calendar_monthly_view()

* line 59 of /lib/ajax/service.php: call to external_api::call_external_function()






Average of ratings: -
In reply to Jaifar Al Shizawi

Re: Error: Can not find data record in database table course.

by James Hamilton -
Hello! Did you make any prorgess on this one?
In reply to Jaifar Al Shizawi

Re: Error: Can not find data record in database table course.

by Gisele Brugger -
I found this tracker https://tracker.moodle.org/browse/MDL-62959
with this information I searched the bank for a group event with idcourse = 0table event

In reply to Gisele Brugger

Re: Error: Can not find data record in database table course.

by Alister Smith -

This solved our issue too!!

Thanks smile