Upgrade from Mahara 1.4 -> 15.04 doesn't work

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

Bug Description

If I try to upgrade from Mahara 1.4 (or earlier) to 15.04 through the web interface, I can't do so. Loading up the main /index.php page presents me with a blank "Site unavailable" error page, and no way to click through to the upgrade screen. Even if I navigate directly to /admin/upgrade.php, it also shows Site Unavailable.

Using git bisect, I traced the cause to commit 90a1c4294cc29181d474093420a172ab01bd1d1a, which is the patch for Bug 1408473, "Upload 'no institution' site logo through admin -> institution"

In the Apache logs, I see this error:

 [WAR] f2 (lib/errors.php:747) Failed to get a recordset: postgres8 error: [-1: ERROR: column "logo" does not exist
 [WAR] f2 (lib/errors.php:747) LINE 1: SELECT "logo" FROM "institution" WHERE "name" = $1
 [WAR] f2 (lib/errors.php:747) ^] in EXECUTE("SELECT "logo" FROM "institution" WHERE "name" = ? ")
 [WAR] f2 (lib/errors.php:747) Command was: SELECT "logo" FROM "institution" WHERE "name" = ? and values was (mahara)
 Call stack (most recent first):
   * log_message("Failed to get a recordset: postgres8 error: [-1: E...", 8, true, true) at /home/aaronw/www/mahara/htdocs/lib/errors.php:97
   * log_warn("Failed to get a recordset: postgres8 error: [-1: E...") at /home/aaronw/www/mahara/htdocs/lib/errors.php:747
   * SQLException->__construct("Failed to get a recordset: postgres8 error: [-1: E...") at /home/aaronw/www/mahara/htdocs/lib/dml.php:480
   * get_recordset_sql("SELECT "logo" FROM "institution" WHERE "name" = ?...", array(size 1)) at /home/aaronw/www/mahara/htdocs/lib/dml.php:791
   * get_field_sql("SELECT "logo" FROM "institution" WHERE "name" = ?...", array(size 1)) at /home/aaronw/www/mahara/htdocs/lib/dml.php:779
   * get_field("institution", "logo", "name", "mahara") at /home/aaronw/www/mahara/htdocs/lib/web.php:1055
   * Theme->header_logo() at /home/aaronw/www/mahara/htdocs/lib/web.php:502
   * smarty() at /home/aaronw/www/mahara/htdocs/admin/upgrade.php:32

 [WAR] f2 (lib/dml.php:480) Failed to get a recordset: postgres8 error: [-1: ERROR: column "logo" does not exist
 [WAR] f2 (lib/dml.php:480) LINE 1: SELECT "logo" FROM "institution" WHERE "name" = $1
 [WAR] f2 (lib/dml.php:480) ^] in EXECUTE("SELECT "logo" FROM "institution" WHERE "name" = ? ")
 [WAR] f2 (lib/dml.php:480) Command was: SELECT "logo" FROM "institution" WHERE "name" = ? and values was (mahara)
 Call stack (most recent first):
   * get_recordset_sql("SELECT "logo" FROM "institution" WHERE "name" = ?...", array(size 1)) at /home/aaronw/www/mahara/htdocs/lib/dml.php:791
   * get_field_sql("SELECT "logo" FROM "institution" WHERE "name" = ?...", array(size 1)) at /home/aaronw/www/mahara/htdocs/lib/dml.php:779
   * get_field("institution", "logo", "name", "mahara") at /home/aaronw/www/mahara/htdocs/lib/web.php:1055
   * Theme->header_logo() at /home/aaronw/www/mahara/htdocs/lib/web.php:502
   * smarty() at /home/aaronw/www/mahara/htdocs/admin/upgrade.php:32

 [WAR] f2 (lib/errors.php:747) Failed to get a recordset: postgres8 error: [-1: ERROR: column "logo" does not exist
 [WAR] f2 (lib/errors.php:747) LINE 1: SELECT "logo" FROM "institution" WHERE "name" = $1
 [WAR] f2 (lib/errors.php:747) ^] in EXECUTE("SELECT "logo" FROM "institution" WHERE "name" = ? ")
 [WAR] f2 (lib/errors.php:747) Command was: SELECT "logo" FROM "institution" WHERE "name" = ? and values was (mahara)
 Call stack (most recent first):
   * log_message("Failed to get a recordset: postgres8 error: [-1: E...", 8, true, true) at /home/aaronw/www/mahara/htdocs/lib/errors.php:97
   * log_warn("Failed to get a recordset: postgres8 error: [-1: E...") at /home/aaronw/www/mahara/htdocs/lib/errors.php:747
   * SQLException->__construct("Failed to get a recordset: postgres8 error: [-1: E...") at /home/aaronw/www/mahara/htdocs/lib/dml.php:480
   * get_recordset_sql("SELECT "logo" FROM "institution" WHERE "name" = ?...", array(size 1)) at /home/aaronw/www/mahara/htdocs/lib/dml.php:791
   * get_field_sql("SELECT "logo" FROM "institution" WHERE "name" = ?...", array(size 1)) at /home/aaronw/www/mahara/htdocs/lib/dml.php:779
   * get_field("institution", "logo", "name", "mahara") at /home/aaronw/www/mahara/htdocs/lib/web.php:1055
   * Theme->header_logo() at /home/aaronw/www/mahara/htdocs/lib/web.php:502
   * smarty(array(size 0), array(size 0), array(size 0), array(size 1)) at /home/aaronw/www/mahara/htdocs/lib/errors.php:576
   * MaharaException->handle_exception() at /home/aaronw/www/mahara/htdocs/lib/errors.php:467
   * exception(object(SQLException)) at Unknown:0

 [WAR] f2 (lib/errors.php:585) Exception thrown by smarty call while handling exception
 Call stack (most recent first):
   * log_message("Exception thrown by smarty call while handling exc...", 8, true, true) at /home/aaronw/www/mahara/htdocs/lib/errors.php:97
   * log_warn("Exception thrown by smarty call while handling exc...") at /home/aaronw/www/mahara/htdocs/lib/errors.php:585
   * MaharaException->handle_exception() at /home/aaronw/www/mahara/htdocs/lib/errors.php:467
   * exception(object(SQLException)) at Unknown:0

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

To replicate:

1. Check out 1.1_STABLE
2. Run the web-based installer.
3. Check out master or 15.04_STABLE
4. Attempt to run the web-based upgrader

summary: - Upgrade from Mahara 1.1 -> 15.04 doesn't work
+ Upgrade from Mahara 1.4 -> 15.04 doesn't work
description: updated
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/4475

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

Reviewed: https://reviews.mahara.org/4475
Committed: http://gitorious.org/mahara/mahara/commit/27bd7b923c235ca1a2fedd9db882d7502cad54b8
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 27bd7b923c235ca1a2fedd9db882d7502cad54b8
Author: Aaron Wells <email address hidden>
Date: Thu Mar 26 18:37:00 2015 +1300

Ignore SQLException when trying to fetch site logo

Bug 1436672: We already check for install, but upgrades can
also cause a problem. Just ignoring the SQLException here covers
all the bases.

Change-Id: I14156700c85290f630d19d6cca67cbc7bf59be45

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

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

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

Reviewed: https://reviews.mahara.org/4477
Committed: http://gitorious.org/mahara/mahara/commit/a00b9fd489dc871abc056627a5840f1aa7327aae
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE

commit a00b9fd489dc871abc056627a5840f1aa7327aae
Author: Aaron Wells <email address hidden>
Date: Thu Mar 26 18:37:00 2015 +1300

Ignore SQLException when trying to fetch site logo

Bug 1436672: We already check for install, but upgrades can
also cause a problem. Just ignoring the SQLException here covers
all the bases.

Change-Id: I14156700c85290f630d19d6cca67cbc7bf59be45

Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
tags: added: no-behat-needed
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.