Fatal error upgrading 1.3->15.04 or 1.4->15.04

Bug #1494133 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Aaron Wells
15.04
Fix Released
High
Aaron Wells
15.10
Fix Released
High
Aaron Wells

Bug Description

To replicate:

1. Clean install of Mahara 1.3 to 1.4
2. Upgrade to Mahara 15.04 (via CLI; I haven't tested via the web upgraded)

Expected result: Successful upgrade
Actual result: Crashes with this fatal error:

PHP Fatal error: Uncaught exception 'SQLException' with message 'Failed to get a recordset: postgres8 error: [-18: ERROR: relation "institution_config" does not exist
LINE 1: SELECT field, value FROM "institution_config" WHERE "institu...
                                 ^] in EXECUTE("SELECT field, value FROM "institution_config" WHERE "institution" = ? ORDER BY field ")
Command was: SELECT field, value FROM "institution_config" WHERE "institution" = ? ORDER BY field and values was (mahara)' in mahara/htdocs/lib/dml.php:480
Stack trace:
#0 mahara/htdocs/lib/dml.php(429): get_recordset_sql('SELECT field, v...', Array)
#1 mahara/htdocs/lib/dml.php(393): get_recordset_select('institution_con...', '"institution" =...', Array, 'field', 'field, value', '', '')
#2 mahara/htdocs/lib/dml.php(719): get_recordset('institution_con...', 'institution', 'mahara', 'field', 'field, value')
#3 mahara/htdocs/lib/institution.php(277): get_records_menu('instit in /home/aaronw/www/mahara/htdocs/lib/dml.php on line 480

Works fine when upgrading from 1.1, 1.2, or 1.5. So it's probably caused by some discrepancy between the 1.3 & 1.4 upgrade vs clean install.

I noticed the same problem in a 1.4 -> 15.10dev upgrade. But, strangely, not in a 1.3 -> 15.10dev upgrade.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Marked high priority because we claim to support upgrades from Mahara 1.1. So this is a fatal crash caused by supported behavior.

Changed in mahara:
importance: Undecided → Medium
milestone: none → 15.04.4
Revision history for this message
Aaron Wells (u-aaronw) wrote :

Also, apparently it is not sufficient to just test upgrades from a clean 1.1 install. It seems there are schema discrepancies unique to some of the old major versions, so we need to clear those up and/or test from a clean install from each of the old major versions we claim to support upgrades from.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/5252

Aaron Wells (u-aaronw)
description: updated
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/5253

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5252
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/bc1fbf6c1d65e54c349e23695bc20acbdefe721b
Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit bc1fbf6c1d65e54c349e23695bc20acbdefe721b
Author: Aaron Wells <email address hidden>
Date: Thu Sep 10 17:59:59 2015 +1200

Catch exceptions during upgrade due to missing table

Bug 1494133

behatnotneeded: Covered by existing tests

Change-Id: I4c0d93a462fad6a42c2dfca88704d59037357529

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/5253
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/cf9c702d012236035b620ebeb401032892f59430
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE

commit cf9c702d012236035b620ebeb401032892f59430
Author: Aaron Wells <email address hidden>
Date: Thu Sep 10 17:59:59 2015 +1200

Catch exceptions during upgrade due to missing table

Bug 1494133

behatnotneeded: Covered by existing tests

Change-Id: I4c0d93a462fad6a42c2dfca88704d59037357529
(cherry picked from commit bc1fbf6c1d65e54c349e23695bc20acbdefe721b)

Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.