Patch for "master" branch: https://reviews.mahara.org/8328
-- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1735072 Title: Event log error during upgrade from 16.10 to 17.10 Status in Mahara: Fix Committed Status in Mahara 17.10 series: Confirmed Status in Mahara 18.04 series: Fix Committed Bug description: Mahara: 17.10.0 (during upgrade from 16.10) OS: Linux 14.04 DB: Postgres Browser: N/A - running upgrade through CLI During the upgrade from a Mahara 16.10.6 to Mahara 17.10, we get the following error: [WAR] 42 (lib/adodb/adodb-exceptions.inc.php:45) Array to string conversion Call stack (most recent first): * log_message("Array to string conversion", 8, true, true, "/var/www/mahara/htdocs/lib/adodb/adodb...", 45) at /var/www/mahara/htdocs/lib/errors.php:521 * error(8, "Array to string conversion", "/var/www/mahara/htdocs/lib/adodb/adodb...", 45, array(size 7)) at /var/www/mahara/htdocs/lib/adodb/adodb-exceptions.inc.php:45 * ADODB_Exception->__construct("postgres8", "adodb_throw", -1, "ERROR: null value in column "time" violates not-n...", "INSERT INTO "event_log" ("usr", "realusr", "event"...", array(size 4), object(ADODB_postgres8)) at /var/www/mahara/htdocs/lib/adodb/adodb-exceptions.inc.php:80 * adodb_throw("postgres8", "adodb_throw", -1, "ERROR: null value in column "time" violates not-n...", "INSERT INTO "event_log" ("usr", "realusr", "event"...", array(size 4), object(ADODB_postgres8)) at /var/www/mahara/htdocs/lib/adodb/adodb.inc.php:313 * ADODB_TransMonitor("postgres8", "EXECUTE", -1, "ERROR: null value in column "time" violates not-n...", "INSERT INTO "event_log" ("usr", "realusr", "event"...", array(size 4), object(ADODB_postgres8)) at /var/www/mahara/htdocs/lib/adodb/adodb.inc.php:1264 * ADOConnection->_Execute("INSERT INTO "event_log" ("usr", "realusr", "event"...", array(size 4)) at /var/www/mahara/htdocs/lib/adodb/adodb.inc.php:1224 * ADOConnection->Execute("INSERT INTO "event_log" ("usr", "realusr", "event"...", array(size 4)) at /var/www/mahara/htdocs/lib/dml.php:1102 * insert_record("event_log", object(stdClass)) at /var/www/mahara/htdocs/lib/mahara.php:2008 * handle_event("saveartefact", object(ArtefactTypeStudentid)) at /var/www/mahara/htdocs/artefact/lib.php:658 * ArtefactType->commit() at /var/www/mahara/htdocs/artefact/internal/lib.php:774 * ArtefactTypeCachedProfileField->commit() at /var/www/mahara/htdocs/lib/user.php:577 * set_profile_field("56999", "studentid", "u3547155", true) at /var/www/mahara/htdocs/lib/db/upgrade.php:4731 * xmldb_core_upgrade("2016090230") at /var/www/mahara/htdocs/lib/upgrade.php:347 * upgrade_core(object(stdClass)) at /var/www/mahara/htdocs/lib/mahara.php:268 * upgrade_mahara(array(size 1)) at /var/www/mahara/htdocs/admin/cli/upgrade.php:53 [WAR] 42 (lib/errors.php:859) Failed to get a recordset: postgres8 error: [-1: ERROR: null value in column "time" violates not-null constraint [WAR] 42 (lib/errors.php:859) DETAIL: Failing row contains (0, 0, null, saveartefact, {"owner":"56999","ctime":1511926716,"mtime":1511926716,"atime":1...).] in adodb_throw(INSERT INTO "event_log" ("usr", "realusr", "event", "data") VALUES (?, ?, ?, ?), Array)Command was: INSERT INTO "event_log" ("usr", "realusr", "event", "data") VALUES (?, ?, ?, ?) and values was (usr:0,realusr:0,event:saveartefact,data:{"owner":"56999","ctime":1511926716,"mtime":1511926716,"atime":1511926716,"title":"u3547155","author":"56999","path":"\/314601"}) Call stack (most recent first): * log_message("Failed to get a recordset: postgres8 error: [-1: E...", 8, true, true) at /var/www/mahara/htdocs/lib/errors.php:95 * log_warn("Failed to get a recordset: postgres8 error: [-1: E...") at /var/www/mahara/htdocs/lib/errors.php:859 * SQLException->__construct("Failed to get a recordset: postgres8 error: [-1: E...") at /var/www/mahara/htdocs/lib/dml.php:1105 * insert_record("event_log", object(stdClass)) at /var/www/mahara/htdocs/lib/mahara.php:2008 * handle_event("saveartefact", object(ArtefactTypeStudentid)) at /var/www/mahara/htdocs/artefact/lib.php:658 * ArtefactType->commit() at /var/www/mahara/htdocs/artefact/internal/lib.php:774 * ArtefactTypeCachedProfileField->commit() at /var/www/mahara/htdocs/lib/user.php:577 * set_profile_field("56999", "studentid", "u3547155", true) at /var/www/mahara/htdocs/lib/db/upgrade.php:4731 * xmldb_core_upgrade("2016090230") at /var/www/mahara/htdocs/lib/upgrade.php:347 * upgrade_core(object(stdClass)) at /var/www/mahara/htdocs/lib/mahara.php:268 * upgrade_mahara(array(size 1)) at /var/www/mahara/htdocs/admin/cli/upgrade.php:53 [WAR] 42 (lib/dml.php:1105) Failed to get a recordset: postgres8 error: [-1: ERROR: null value in column "time" violates not-null constraint [WAR] 42 (lib/dml.php:1105) DETAIL: Failing row contains (0, 0, null, saveartefact, {"owner":"56999","ctime":1511926716,"mtime":1511926716,"atime":1...).] in adodb_throw(INSERT INTO "event_log" ("usr", "realusr", "event", "data") VALUES (?, ?, ?, ?), Array)Command was: INSERT INTO "event_log" ("usr", "realusr", "event", "data") VALUES (?, ?, ?, ?) and values was (usr:0,realusr:0,event:saveartefact,data:{"owner":"56999","ctime":1511926716,"mtime":1511926716,"atime":1511926716,"title":"u3547155","author":"56999","path":"\/314601"}) Call stack (most recent first): * insert_record("event_log", object(stdClass)) at /var/www/mahara/htdocs/lib/mahara.php:2008 * handle_event("saveartefact", object(ArtefactTypeStudentid)) at /var/www/mahara/htdocs/artefact/lib.php:658 * ArtefactType->commit() at /var/www/mahara/htdocs/artefact/internal/lib.php:774 * ArtefactTypeCachedProfileField->commit() at /var/www/mahara/htdocs/lib/user.php:577 * set_profile_field("56999", "studentid", "u3547155", true) at /var/www/mahara/htdocs/lib/db/upgrade.php:4731 * xmldb_core_upgrade("2016090230") at /var/www/mahara/htdocs/lib/upgrade.php:347 * upgrade_core(object(stdClass)) at /var/www/mahara/htdocs/lib/mahara.php:268 * upgrade_mahara(array(size 1)) at /var/www/mahara/htdocs/admin/cli/upgrade.php:53 The issue is that there are changes to the table event_log which is not catered for in this part of the script. To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1735072/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp