Problem writing to database

Problem writing to database

by Aileen Martin -
Number of replies: 1

I have recently upgraded to Moodle 2.6 and today discovered that I can no longer add new users.  The error that appears is "Error writing to Database".  The Debug info provided the following

Debug info: Column 'calendartype' cannot be null
INSERT INTO mdl_user (username,auth,suspended,firstname,lastname,email,maildisplay,mailformat,maildigest,autosubscribe,trackforums,city,country,timezone,lang,imagealt,firstnamephonetic,lastnamephonetic,middlename,alternatename,url,icq,skype,aim,yahoo,msn,idnumber,institution,department,phone1,phone2,address,timemodified,description,descriptionformat,mnethostid,confirmed,timecreated,password,calendartype) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
[array (
0 => 'testuser',
1 => 'manual',
2 => '0',
3 => 'Test',
4 => 'User',
5 => 'testuser@midas.ie',
6 => '2',
7 => '1',
8 => '0',
9 => '1',
10 => '0',
11 => '',
12 => '',
13 => '99',
14 => 'en',
15 => '',
16 => '',
17 => '',
18 => '',
19 => '',
20 => '',
21 => '',
22 => '',
23 => '',
24 => '',
25 => '',
26 => '',
27 => '',
28 => '',
29 => '',
30 => '',
31 => '',
32 => 1424210938,
33 => '',
34 => '1',
35 => '1',
36 => 1,
37 => 1424210938,
38 => '$2y$10$uHvfUx21tVadeVQ9lnCurOy11MPk6Txn1AwMUeB69X4qelcxPm4ja',
39 => NULL,
)]
Error code: dmlwriteexception

Stack trace:

·line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown

·line 1146 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()

·line 1188 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()

·line 79 of /user/lib.php: call to mysqli_native_moodle_database->insert_record()

·line 189 of /user/editadvanced.php: call to user_create_user()


I've looked through the forums and have tried the following fixes - 

- editing the lib/dml/mysqli_native_moodle_database.php by changing "READ COMMITTED" to "REPEATABLE READ"

- Opening the my.cnf file from moodle and adding 

   binlog_format="ROW".  In this respect, I wasn't sure if I was opening the right file as the only content that was in this file was [Client] and nothing else.  


Neither of these have worked.  I'm still getting the same error unfortunately.  Would anyone have any idea what I could do next or if I should be asking my host provider to make changes on the server.

Average of ratings: -