Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-75357

Unknown column 'msn' in 'field list

XMLWordPrintable

    • MOODLE_311_STABLE

      This appears to be a re-occurence of MDL-38289 and MDL-37773 that really should have been sorted in the robustness of the Restrict Access system.

      We had in the past stored data in the 'msn' field of the user profile as a work around, and users have used that data to create restrict access conditions based on those values.

      Then the 'msn' field was removed (fair enough) but the restrict access sub-system doesn't appear to have been written in a way that can handle the disappearance of a field and as a result it throws:

      [02-Aug-2022 15:29:10 Europe/London] Default exception handler: Error reading from database Debug: Unknown column 'msn' in 'field list'
      SELECT msn FROM mdl_user WHERE id = ?
      [array (
        0 => '168061',
      )]
      Error code: dmlreadexception
      * line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
      * line 1273 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      * line 1671 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
      * line 1744 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
      * line 1725 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
      * line 1704 of /lib/dml/moodle_database.php: call to moodle_database->get_field_select()
      * line 436 of /availability/condition/profile/classes/condition.php: call to moodle_database->get_field()
      * line 179 of /availability/condition/profile/classes/condition.php: call to availability_profile\condition->get_cached_user_profile_field()
      * line 84 of /availability/classes/condition.php: call to availability_profile\condition->is_available()
      * line 265 of /availability/classes/tree.php: call to core_availability\condition->check_available()
      * line 197 of /availability/classes/info.php: call to core_availability\tree->check_available()
      * line 2987 of /lib/modinfolib.php: call to core_availability\info->is_available()
      * line 2107 of /lib/modinfolib.php: call to section_info->get_available()
      * line 1607 of /lib/modinfolib.php: call to cm_info->obtain_dynamic_data()
      * line 1157 of /lib/completionlib.php: call to cm_info->get_custom_data()
      * line 1123 of /lib/completionlib.php: call to completion_info->get_other_cm_completion_data()
      * line 623 of /lib/completionlib.php: call to completion_info->get_data()
      * line 1457 of /lib/completionlib.php: call to completion_info->update_state()
      * line 1203 of /lib/grade/grade_grade.php: call to completion_info->inform_grade_changed()
      * line 367 of /lib/grade/grade_object.php: call to grade_grade->notify_changed()
      * line 1033 of /lib/grade/grade_grade.php: call to grade_object->insert()
      * line 653 of /lib/grade/grade_category.php: call to grade_grade->insert()
      * line 541 of /lib/grade/grade_category.php: call to grade_category->aggregate_grades()
      * line 809 of /lib/grade/grade_item.php: call to grade_category->generate_grades()
      * line 1276 of /lib/gradelib.php: call to grade_item->regrade_final_grades()
      * line 378 of /course/modlib.php: call to grade_regrade_final_grades()
      * line 180 of /course/modlib.php: call to edit_module_post_actions()
      * line 168 of /course/modedit.php: call to add_moduleinfo() 

            Unassigned Unassigned
            mhughes2k Michael Hughes
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.