You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding block_attendance (and mod_attendance) breaks the site, you get an error on login (Moodle 3.11.5):
Debug info: SELECT id,parent FROM {course_categories} WHERE id = ?
[array (
0 => '0',
)]
Error code: invalidrecord
Stack trace:
line 1646 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
line 1622 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 6742 of /lib/accesslib.php: call to moodle_database->get_record()
line 107 of /blocks/attendance/block_attendance.php: call to context_coursecat::instance()
line 341 of /blocks/moodleblock.class.php: call to block_attendance->get_content()
line 235 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
line 1181 of /lib/blocklib.php: call to block_base->get_content_for_output()
line 1239 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 3984 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 1400 of /lib/outputrenderers.php: call to include()
line 1330 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 100 of /index.php: call to core_renderer->header()
Alternatively -- and as a workaround for anyone encountering this error -- insert the following lines to blocks/attendance/block_attendance.php below line 56:
if ($COURSE->id === SITEID) {
return $this->content;
}
Adding block_attendance (and mod_attendance) breaks the site, you get an error on login (Moodle 3.11.5):
Debug info: SELECT id,parent FROM {course_categories} WHERE id = ?
[array (
0 => '0',
)]
Error code: invalidrecord
Stack trace:
line 1646 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
line 1622 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 6742 of /lib/accesslib.php: call to moodle_database->get_record()
line 107 of /blocks/attendance/block_attendance.php: call to context_coursecat::instance()
line 341 of /blocks/moodleblock.class.php: call to block_attendance->get_content()
line 235 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
line 1181 of /lib/blocklib.php: call to block_base->get_content_for_output()
line 1239 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 3984 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 1400 of /lib/outputrenderers.php: call to include()
line 1330 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 100 of /index.php: call to core_renderer->header()
Originally reported in Moodle forum post: Can't find data record in database table course_categories.
The text was updated successfully, but these errors were encountered: