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

Too short mdl_log.action causing "Could not insert a new entry to the Moodle log"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.2.5
    • Fix Version/s: None
    • Component/s: Database SQL/XMLDB, Logging
    • Labels:
    • Workaround:
      Hide

      The work-around is to adjust the size of log.action manually, to 40.

      Show
      The work-around is to adjust the size of log.action manually, to 40.
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      The log.action column on our Moodle instance is varchar(15) (MySQL) and it should be:
      <FIELD NAME="action" TYPE="char" LENGTH="40" NOTNULL="true" SEQUENCE="false" PREVIOUS="cmid" NEXT="url"/>
      The instance was upgraded from 1.9 to 2.2 - I imagine that something during an upgrade went wrong and column was no resized.

      Easy way to reproduce it is to simply re-start a quiz, "continue attempt" message is too long (16 characters).

      One way of dealing with it would be to add check like "Check indexes" or "Check defaults" from XMLDB editor, that would check if the column sizes are as defined in install.xml.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              moodle.com moodle.com
              Reporter:
              tmuras Tomasz Muras
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: