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
Patch for "master" branch: https:/ /reviews. mahara. org/7203