Error writing to database: null value in column "timezone"

Error writing to database: null value in column "timezone"

by Mata Henry -
Number of replies: 2

Hi folks

Wondering if anyone can help with a error thrown when trying to create some facetoface sessions in a test environment.
I dont have access to server php but will send some feedback to our IT dept if anyone can help here.

Sincere thanks in advance for any help!

Debug info: ERROR: null value in column "timezone" violates not-null constraint
DETAIL: Failing row contains (45, 27, 10, 0, null, 0, 0, 0, 0, 1555304689, 0, null).
INSERT INTO mdl_facetoface_sessions (facetoface,datetimeknown,capacity,allowoverbook,duration,normalcost,discountcost,timecreated) VALUES($1,$2,$3,$4,$5,$6,$7,$8) RETURNING id
[array (
'facetoface' => '27',
'datetimeknown' => '0',
'capacity' => '10',
'allowoverbook' => 0,
'duration' => 0.0,
'normalcost' => 0.0,
'discountcost' => 0.0,
'timecreated' => 1555304689,
)]
Error code: dmlwriteexception
Stack trace:
  • line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 248 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
  • line 969 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
  • line 1017 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw()
  • line 448 of /mod/facetoface/lib.php: call to pgsql_native_moodle_database->insert_record()
  • line 225 of /mod/facetoface/sessions.php: call to facetoface_add_session()
Output buffer: <br /> <b>Notice</b>: Undefined property: stdClass::$allowcancellationsdefault in <b>/var/www/moodle_lf_test/mod/facetoface/classes/session_form.php</b> on line <b>112</b><br />

Moodle 3.5.5+ (Build: 20190322)
PHP Version 7.1.8

Average of ratings: -
In reply to Mata Henry

Re: Error writing to database: null value in column "timezone"

by James Todd -
Hi Mata

Have a look at this post.
It may fix your problem

https://moodle.org/mod/forum/discuss.php?d=341001#p1374593
Average of ratings: Useful (1)
In reply to James Todd

Re: Error writing to database: null value in column "timezone"

by Mata Henry -
Hi James

Cheers for your help! I see Dan's teams time and funds on the dev on the plugin is very limited (totally understandable) hence the github enviro being somewhat quiet.

Would you recommend to stay with the plugin? or could you recommend perhaps others like scheduler: https://moodle.org/plugins/mod_scheduler or Reservation? Reservation https://moodle.org/plugins/pluginversions.php?plugin=mod_reservation

We are set to utilise a plugin across four Moodle LMS sites so would welcome your recommendation!

Thank you
Mata