Public bug reported:

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

** Affects: mahara
     Importance: Medium
     Assignee: Aaron Wells (u-aaronw)
         Status: Invalid

** Affects: mahara/1.10
     Importance: Medium
     Assignee: Aaron Wells (u-aaronw)
         Status: In Progress

** Affects: mahara/15.04
     Importance: Medium
     Assignee: Aaron Wells (u-aaronw)
         Status: In Progress

** Affects: mahara/15.10
     Importance: Medium
     Assignee: Aaron Wells (u-aaronw)
         Status: Invalid

** Also affects: mahara/15.10
   Importance: Undecided
       Status: New

** Also affects: mahara/1.10
   Importance: Undecided
       Status: New

** Also affects: mahara/15.04
   Importance: Undecided
       Status: New

** Changed in: mahara/1.10
    Milestone: None => 1.10.7

** Changed in: mahara/15.04
    Milestone: None => 15.04.4

** Changed in: mahara/15.10
    Milestone: None => 15.10.0

** Changed in: mahara/1.10
       Status: New => Confirmed

** Changed in: mahara/15.04
       Status: New => In Progress

** Changed in: mahara/1.10
       Status: Confirmed => In Progress

** Changed in: mahara/15.10
       Status: New => In Progress

** Changed in: mahara/1.10
   Importance: Undecided => Medium

** Changed in: mahara/15.04
   Importance: Undecided => Medium

** Changed in: mahara/15.10
   Importance: Undecided => Medium

** Changed in: mahara/1.10
     Assignee: (unassigned) => Aaron Wells (u-aaronw)

** Changed in: mahara/15.04
     Assignee: (unassigned) => Aaron Wells (u-aaronw)

** Changed in: mahara/15.10
     Assignee: (unassigned) => Aaron Wells (u-aaronw)

** Changed in: mahara/15.10
       Status: In Progress => Fix Released

** Changed in: mahara/15.10
       Status: Fix Released => Invalid

-- 
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:
  In Progress
Status in Mahara 15.04 series:
  In Progress
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

_______________________________________________
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

Reply via email to