mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #30712
[Bug 1494152] Re: Fatal error upgrading from 1.4 or earlier to 1.10 or later, with objectionable content reports
** Changed in: mahara/1.10
Status: Fix Committed => Fix Released
--
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/1494152
Title:
Fatal error upgrading from 1.4 or earlier to 1.10 or later, with
objectionable content reports
Status in Mahara:
Invalid
Status in Mahara 1.10 series:
Fix Released
Status in Mahara 15.04 series:
Fix Committed
Status in Mahara 15.10 series:
Invalid
Bug description:
In Mahara 1.10, when we added objectionable item reporting to the
forums, we migrated all the old objectionable item view_access records
into the new "objectionable" table. Part of this upgrade took
view_access.ctime and used it for the "reportdate" column in the
objectionable table, because view_access.ctime is supposed to be not
null.
But, if you upgraded from Mahara 1.4 or earlier, view_access.ctime is
NULL (see https://bugs.launchpad.net/bugs/1494128 ). So, this causes
the upgrade to crash.
To replicate:
1. Install Mahara 1.4
2. Create a page
3. Go to the page and use the "Report objectionable" button on it.
4. Upgrade to Mahara 1.10
Expected result: Successful upgrade
Actual result: Fatal error.
[WAR] bb (lib/dml.php:1046) Failed to get a recordset: postgres7 error: [-1: ERROR: null value in column "reportedtime" violates not-null constraint] in adodb_throw(INSERT INTO "objectionable" ("objecttype", "objectid", "reportedby", "report") VALUES (?, ?, ?, ?), Array)
[WAR] bb (lib/dml.php:1046) Command was: INSERT INTO "objectionable" ("objecttype", "objectid", "reportedby", "report") VALUES (?, ?, ?, ?) and values was (view,6,0,)
Call stack (most recent first):
* insert_record("objectionable", object(stdClass)) at /home/aaronw/www/mahara/htdocs/lib/db/upgrade.php:3383
* xmldb_core_upgrade("2011061015") at /home/aaronw/www/mahara/htdocs/lib/upgrade.php:359
* upgrade_core(object(stdClass)) at /home/aaronw/www/mahara/htdocs/lib/mahara.php:253
* upgrade_mahara(array(size 14)) at /home/aaronw/www/mahara/htdocs/admin/cli/upgrade.php:50
A nonrecoverable error occurred. This probably means you have
encountered a bug in the system(1.10_STABLE)aaronw@vega
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1494152/+subscriptions
References