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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.4, 2.5.2
    • Fix Version/s: BACKEND
    • Component/s: Logging
    • Labels:
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              koen Koen Roggemans
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              5 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: