-
Bug
-
Resolution: Fixed
-
Minor
-
2.9.4, 3.0.2, 3.1
-
MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE
-
MOODLE_29_STABLE, MOODLE_30_STABLE
-
MDL-52938-master -
How to replicate:
Login as any user
Go to profile preferences
Click Forum Preferences
Make any change and hit submit
Expected behaviour: profile updated
Observed behaviour: error writing to database message
NOTE: The following has been toggled to both No and Yes and the error still persists:
Site Admin -> Users -> User default preferences -> Forum Tracking
Debug info: Column 'trackforums' cannot be null
UPDATE mdl_user SET auth = ?,confirmed = ?,policyagreed = ?,deleted = ?,suspended = ?,mnethostid = ?,username = ?,password = ?,idnumber = ?,firstname = ?,lastname = ?,email = ?,emailstop = ?,icq = ?,skype = ?,yahoo = ?,aim = ?,msn = ?,phone1 = ?,phone2 = ?,institution = ?,department = ?,address = ?,city = ?,country = ?,lang = ?,calendartype = ?,theme = ?,timezone = ?,firstaccess = ?,lastaccess = ?,lastlogin = ?,currentlogin = ?,lastip = ?,secret = ?,picture = ?,url = ?,description = ?,descriptionformat = ?,mailformat = ?,maildigest = ?,maildisplay = ?,autosubscribe = ?,trackforums = ?,timecreated = ?,timemodified = ?,trustbitmask = ?,imagealt = ?,lastnamephonetic = ?,firstnamephonetic = ?,middlename = ?,alternatename = ? WHERE id=?
[array (
0 => 'ldap',
1 => '1',
2 => '0',
3 => '0',
4 => '0',
5 => '1',
6 => 'SANITIZED',
7 => 'not cached',
8 => 'CN=SANITIZED,OU=Staff,DC=sastudents,DC=uwi,DC=tt',
9 => 'Noveck',
10 => 'Gowandan',
11 => 'Noveck.Gowandan@SANITIZED',
12 => '0',
13 => '',
14 => '',
15 => '',
16 => '',
17 => '',
18 => '',
19 => '',
20 => '',
21 => '',
22 => '',
23 => 'Couva',
24 => '',
25 => 'en',
26 => 'gregorian',
27 => '',
28 => '99',
29 => '1435582861',
30 => '1454072365',
31 => '1454024996',
32 => '1454071299',
33 => '192.168.64.36',
34 => '',
35 => '0',
36 => '',
37 => '',
38 => '1',
39 => '1',
40 => '2',
41 => '2',
42 => '1',
43 => NULL,
44 => '1435582861',
45 => 1454072426,
46 => '0',
47 => '',
48 => '',
49 => '',
50 => '',
51 => '',
52 => '5',
)]
Error code: dmlwriteexception
Stack trace:
line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
line 1392 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1424 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
line 173 of /user/lib.php: call to mysqli_native_moodle_database->update_record()
line 52 of /user/forum.php: call to user_update_user()
Output buffer: <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined property: stdClass::$trackforums in /var/www/html/user/forum.php on line <i>50</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0001</td><td bgcolor='#eeeeec' align='right'>239712</td><td bgcolor='#eeeeec'>
( )</td><td title='/var/www/html/user/forum.php' bgcolor='#eeeeec'>.../forum.php<b>:</b>0</td></tr> </table></font>
Continue