Reviewed: https://reviews.mahara.org/7206 Committed: https://git.mahara.org/mahara/mahara/commit/55be8c37c84952ee5399f798e0c1fa7eb9f99b9d Submitter: Robert Lyon (robe...@catalyst.net.nz) Branch: 16.10_STABLE
commit 55be8c37c84952ee5399f798e0c1fa7eb9f99b9d Author: Ghada El-Zoghbi <gh...@catalyst-au.net> Date: Mon Oct 24 17:51:06 2016 +1100 Bug #1636087: Update Glogster's iframe URL only if its icon record was not deleted. Administrators may have removed the Glogster iframe. Do not force an insert of the iframe and update it only if the admin still allow it. behatnotneeded Change-Id: I46f23cd01f86e72c435d5a456e3e56cd53f18bd0 -- 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/1636087 Title: iframe source icon not present in table for 16.10 upgrade Status in Mahara: Fix Committed Status in Mahara 16.10 series: Fix Committed Status in Mahara 17.04 series: Fix Committed Bug description: Mahara: 16.10.0 DB: Postgres OS: Linux Browser: FF Hi, We are upgrading a Mahara 16.04 to 16.10. The client had restricted which iframes they allowed. So, during the pgrade to 16.10, we are seeing this error: [Mon Oct 24 15:36:34.747576 2016] [:error] [pid 14942] [client 192.168.124.214:46542] [WAR] b3 (lib/adodb/adodb-exceptions.inc.php:45) Array to string conversion, referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.747850 2016] [:error] [pid 14942] [client 192.168.124.214:46542] Call stack (most recent first):, referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.748006 2016] [:error] [pid 14942] [client 192.168.124.214:46542] * log_message("Array to string conversion", 8, true, true, "/var/www/clients/mahara/htdocs/lib/adodb/adodb...", 45) at /var/www/clients/mahara/htdocs/lib/errors.php:521, referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.748143 2016] [:error] [pid 14942] [client 192.168.124.214:46542] * error(8, "Array to string conversion", "/var/www/clients/mahara/htdocs/lib/adodb/adodb...", 45, array(size 7)) at /var/www/clients/mahara/htdocs/lib/adodb/adodb-exceptions.inc.php:45, referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.748286 2016] [:error] [pid 14942] [client 192.168.124.214:46542] * ADODB_Exception->__construct("postgres8", "adodb_throw", -1, "ERROR: insert or update on table "iframe_source" ...", "INSERT INTO "iframe_source" ("prefix", "name") VAL...", array(size 2), object(ADODB_postgres8)) at /var/www/clients/mahara/htdocs/lib/adodb/adodb-exceptions.inc.php:80, referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.748424 2016] [:error] [pid 14942] [client 192.168.124.214:46542] * adodb_throw("postgres8", "adodb_throw", -1, "ERROR: insert or update on table "iframe_source" ...", "INSERT INTO "iframe_source" ("prefix", "name") VAL...", array(size 2), object(ADODB_postgres8)) at /var/www/clients/mahara/htdocs/lib/adodb/adodb.inc.php:298, referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.748577 2016] [:error] [pid 14942] [client 192.168.124.214:46542] * ADODB_TransMonitor("postgres8", "EXECUTE", -1, "ERROR: insert or update on table "iframe_source" ...", "INSERT INTO "iframe_source" ("prefix", "name") VAL...", array(size 2), object(ADODB_postgres8)) at /var/www/clients/mahara/htdocs/lib/adodb/adodb.inc.php:1249, referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.748717 2016] [:error] [pid 14942] [client 192.168.124.214:46542] * ADOConnection->_Execute("INSERT INTO "iframe_source" ("prefix", "name") VAL...", array(size 2)) at /var/www/clients/mahara/htdocs/lib/adodb/adodb.inc.php:1209, referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.748859 2016] [:error] [pid 14942] [client 192.168.124.214:46542] * ADOConnection->Execute("INSERT INTO "iframe_source" ("prefix", "name") VAL...", array(size 2)) at /var/www/clients/mahara/htdocs/lib/dml.php:1085, referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.748985 2016] [:error] [pid 14942] [client 192.168.124.214:46542] * insert_record("iframe_source", object(stdClass)) at /var/www/clients/mahara/htdocs/lib/db/upgrade.php:4706, referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.749127 2016] [:error] [pid 14942] [client 192.168.124.214:46542] * xmldb_core_upgrade("2016033117") at /var/www/clients/mahara/htdocs/lib/upgrade.php:347, referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.749257 2016] [:error] [pid 14942] [client 192.168.124.214:46542] * upgrade_core(object(stdClass)) at /var/www/clients/mahara/htdocs/admin/upgrade.json.php:87, referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.749431 2016] [:error] [pid 14942] [client 192.168.124.214:46542] , referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.752019 2016] [:error] [pid 14942] [client 192.168.124.214:46542] [WAR] b3 (lib/errors.php:859) Failed to get a recordset: postgres8 error: [-1: ERROR: insert or update on table "iframe_source" violates foreign key constraint "ifrasour_nam_fk", referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.752318 2016] [:error] [pid 14942] [client 192.168.124.214:46542] [WAR] b3 (lib/errors.php:859) DETAIL: Key (name)=(Glogster) is not present in table "iframe_source_icon".] in adodb_throw(INSERT INTO "iframe_source" ("prefix", "name") VALUES (?, ?), Array), referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.752477 2016] [:error] [pid 14942] [client 192.168.124.214:46542] [WAR] b3 (lib/errors.php:859) Command was: INSERT INTO "iframe_source" ("prefix", "name") VALUES (?, ?) and values was (prefix:edu.glogster.com//?glog/,name:Glogster), referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.752560 2016] [:error] [pid 14942] [client 192.168.124.214:46542] Call stack (most recent first):, referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.752769 2016] [:error] [pid 14942] [client 192.168.124.214:46542] * log_message("Failed to get a recordset: postgres8 error: [-1: E...", 8, true, true) at /var/www/clients/mahara/htdocs/lib/errors.php:95, referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.752951 2016] [:error] [pid 14942] [client 192.168.124.214:46542] * log_warn("Failed to get a recordset: postgres8 error: [-1: E...") at /var/www/clients/mahara/htdocs/lib/errors.php:859, referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.753041 2016] [:error] [pid 14942] [client 192.168.124.214:46542] * SQLException->__construct("Failed to get a recordset: postgres8 error: [-1: E...") at /var/www/clients/mahara/htdocs/lib/dml.php:1088, referer: http://d-general-mahara/admin/upgrade.php [Mon Oct 24 15:36:34.753251 2016] [:error] [pid 14942] [client 192.168.124.214:46542] * insert_record("iframe_source", object(stdClass)) at /var/www/clients/mahara/htdocs/lib/db/upgrade.php:4706, referer: http://d-general-mahara/admin/upgrade.php It's due to the foreign key constraint on iframe_source table. We should ensure that a record in the icon table exists for glogster in lib/db/upgrade.php - line 4706: ensure_record_exists('iframe_source_icon', (object) array('name' => 'Glogster', 'domain' => 'edu.glogster.com'), (object) array('name' => 'Glogster', 'domain' => 'edu.glogster.com') ); Thanks, Ghada To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1636087/+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