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

Insert into log failed - action field to small for error code

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • BACKEND
    • 2.4.4, 2.5.2
    • Logging
    • MOODLE_24_STABLE, MOODLE_25_STABLE

      When the log 'action' => 'moodle_user_get_course_participants_by_id', is send to the database, an "insert into log failed" email is generated.
      The reason why is because moodle_user_get_course_participants_by_id is 42 characters long, while the action field has only 40 characters space in my database. I'm not sure if that is the default value, because there have been issues with it being to small in the past.

      So I verified my tables with moodle/admin/tool/xmldb/index.php?action=check_defaults&confirmed=yes and the log table verifies as ok (unlike a lot of others)

      verifying table:
      log
      Veld: time OK
      Veld: userid OK
      Veld: ip OK
      Veld: course OK
      Veld: module OK
      Veld: cmid OK
      Veld: action OK
      Veld: url OK
      Veld: info OK

      So either there is something wrong in the upgrade script, not altering the log action field to de correct size, or the value moodle_user_get_course_participants_by_id is too long.

            Unassigned Unassigned
            koen Koen Roggemans
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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