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

Forum mailings and maintenance jobs fails with error writing to database

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7.1
    • Fix Version/s: None
    • Component/s: Forum
    • Labels:
    • Affected Branches:
      MOODLE_37_STABLE

      Description

      See discussion https://moodle.org/mod/forum/discuss.php?d=389904

      Forum posts get send by email multiple times.

      Debugging the cron job reveals:

      Adhoc task failed: mod_forum\task\send_user_notifications,Fout bij het schrijven van de databank
       Debug info:
       Column count doesn't match value count at row 1
       INSERT INTO mdl_task_log (type,component,classname,userid,timestart,timeend,dbreads,dbwrites,result,output) VALUES(?,?,?,?,?,?,?,?,?,?)
       [array (
       0 => 1,
       1 => 'mod_forum',
       2 => 'mod_forum\\task
      send_user_notifications',
       3 => '2',
       4 => 1567165746.225472,
       5 => 1567165746.357841,
       6 => 22,
       7 => 2,
       8 => 0,
       9 => 'Execute adhoc task: mod_forum\\task
      send_user_notifications
      

      I notice that the first column (id) is not in the list. The table has 11 columns and here are 10 fields.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              koen Koen Roggemans
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              13 Vote for this issue
              Watchers:
              18 Start watching this issue

                Dates

                Created:
                Updated: