** Summary changed: - Upgradeing 1.9.7 => 16.04.4 causes fatal DB error + Upgrading 1.9.7 => 16.04.4 causes fatal DB error
** Also affects: mahara/17.10 Importance: Undecided Status: New ** Changed in: mahara/17.10 Status: New => Confirmed ** Changed in: mahara/17.10 Importance: Undecided => Medium ** Changed in: mahara/17.10 Milestone: None => 17.10.0 -- 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/1679699 Title: Upgrading 1.9.7 => 16.04.4 causes fatal DB error Status in Mahara: Confirmed Status in Mahara 17.10 series: Confirmed Bug description: Error: [WAR] 75 (lib/dml.php:514) Failed to get a recordset: mysqli error: [1146: Table 'mahara_new.artefact_file_embedded' doesn't exist] in EXECUTE("SELECT "id" FROM "artefact_file_embedded" WHERE "fileid" = '11498' AND "resourcetype" = 'blogpost' AND "resourceid" = '11534' ") [WAR] 75 (lib/dml.php:514) Command was: SELECT "id" FROM "artefact_file_embedded" WHERE "fileid" = ? AND "resourcetype" = ? AND "resourceid" = ? and values was (0:11498,1:blogpost,2:11534) Call stack (most recent first): * get_recordset_sql(string(size 108), array(size 3)) at /var/www/html/mahara/lib/dml.php:825 * get_field_sql(string(size 108), array(size 3)) at /var/www/html/mahara/lib/dml.php:813 * get_field(string(size 22), string(size 2), string(size 6), string(size 5), string(size 12), string(size 8), string(size 10), string(size 5)) at /var/www/html/mahara/lib/embeddedimage.php:94 * EmbeddedImage::prepare_embedded_images(string(size 624), string(size 8), string(size 5), null, string(size 3)) at /var/www/html/mahara/artefact/blog/db/upgrade.php:76 * xmldb_artefact_blog_upgrade(string(size 10)) at /var/www/html/mahara/lib/upgrade.php:418 * upgrade_plugin(object(stdClass)) at /var/www/html/mahara/lib/mahara.php:266 * upgrade_mahara(array(size 1)) at /var/www/html/mahara/admin/cli/upgrade.php:53 The reason is that the artefact.blog upgrade for version 2015011501 assumes that the artefact.file upgrade for 2015111200 has already taken place and, hence, that the table 'artefact_file_embedded' has been created. This is not the case for an upgrade from 1.9.7 to 16.04.4. To work around this I've forced artefact.file to be the first artefact to be upgraded, by adding the following code to 'sort_upgrades': if ($weight1 == $weight2) { if ($k1 == 'artefact.file') { return -1; } else if ($k2 == 'artefact.file') { return 1; } } This is a temporary change to make sure that the upgrade can be completed (which it has now done), but reporting here in the hope that this will save anyone else having similar problems. To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1679699/+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