Error creating user

Error creating user

by Nuno Silva -
Number of replies: 2

Hello i have migrated moodle from to version 2.9.2, and when i try to create a user i get this error:

Debug info: Column 'calendartype' cannot be null

INSERT INTO mdl_user (username,auth,suspended,firstname,lastname,email,maildisplay,city,country,timezone,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,mailformat,maildigest,autosubscribe,trackforums,lang) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)

[array (

0 => 'monicagomes',

1 => 'manual',

2 => '0',

3 => 'Monica',

4 => 'Gomes',

5 => 'mgomes81@gmail.com',

6 => '0',

7 => 'Coimbra',

8 => 'PT',

9 => 'Europe/Lisbon',

10 => '',

11 => '',

12 => '',

13 => '',

14 => '',

15 => '',

16 => '',

17 => '',

18 => '',

19 => '',

20 => '',

21 => '',

22 => '',

23 => '',

24 => '',

25 => '',

26 => '',

27 => 1444923558,

28 => '',

29 => '1',

30 => '1',

31 => 1,

32 => 1444923558,

33 => '$2y$10$vsfjOVMKdErHSM3IlzmXDOrPqN5I1u7EXdfXUsOHPpaKZQI72C3hy',

34 => NULL,

35 => NULL,

36 => NULL,

37 => NULL,

38 => NULL,

39 => 'pt',

)]

Error code: dmlwriteexception

Stack trace:

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

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

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

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

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



Also when i try to view the version off moodle and the updates get this error:


Debug info: [dataroot]/filedir/d6/13/d613d55f37bb76d38d4ffb4b7b83e6c694778c30
Error code: storedfilecannotread
Stack trace:
  • line 187 of /lib/filestorage/stored_file.php: file_exception thrown
  • line 871 of /lib/filestorage/stored_file.php: call to stored_file->update()
  • line 424 of /lib/filelib.php: call to stored_file->set_source()
  • line 8812 of /lib/adminlib.php: call to file_prepare_draft_area()
  • line 7117 of /lib/adminlib.php: call to admin_setting_configstoredfile->output_html()
  • line 7092 of /lib/adminlib.php: call to admin_output_new_settings_by_page()
  • line 7092 of /lib/adminlib.php: call to admin_output_new_settings_by_page()
  • line 7092 of /lib/adminlib.php: call to admin_output_new_settings_by_page()
  • line 7092 of /lib/adminlib.php: call to admin_output_new_settings_by_page()
  • line 7092 of /lib/adminlib.php: call to admin_output_new_settings_by_page()
  • line 29 of /admin/upgradesettings.php: call to admin_output_new_settings_by_page()

Can someone help me to solve this?


Thanks in advanced


Nuno Paulo

Average of ratings: -
In reply to Nuno Silva

Re: Error creating user

by novrathan chouhan -

are you getting this error while creating users manually or in bulk.

Average of ratings: Useful (1)
In reply to novrathan chouhan

Re: Error creating user

by Nuno Silva -
Hello, 


Thanks for your reply.

I am having this error in both situations, also when o try ti view the moodle version.


Thanks