Forums | Mahara Community

Support /
Fail Upgrade from 15.10.8 to 17.04


manson tong's profile picture
Posts: 4

09 May 2018, 15:24

I have try to upgrade Mahara from 15.10.8 to 17.04.7 by "sudo php upgrade.php" in terminal. 

Here is the message shown : 
[INF] 4a (admin/cli/upgrade.php:49) Upgrading Mahara
[INF] 4a (lib/mahara.php:234) Upgrading core
[DBG] 4a (lib/db/upgrade.php:4213) Upgrade comment plugin for threaded comments
[DBG] 4a (lib/db/upgrade.php:4220) Expanding the size of the activity_queue.data column
[DBG] 4a (lib/db/upgrade.php:4229) Upgrade wall block and add wall notifications to default inbox block
[DBG] 4a (lib/db/upgrade.php:4252) Updating all user inbox blocks that are still on the default settings
[DBG] 4a (lib/db/upgrade.php:4267) Expanding the size of the block_instance.configdata
[DBG] 4a (lib/db/upgrade.php:4274) Expanding the size of the config.value
[DBG] 4a (lib/db/upgrade.php:4281) Expanding the size of the import_entry_requests.artefactmapping
[DBG] 4a (lib/db/upgrade.php:4288) Expanding the size of the import_entry_requests.duplicateditemids
[DBG] 4a (lib/db/upgrade.php:4295) Expanding the size of the import_entry_requests.existingitemids
[DBG] 4a (lib/db/upgrade.php:4302) Expanding the size of the import_queue.data
[DBG] 4a (lib/db/upgrade.php:4309) Expanding the size of the skin.viewskin
[DBG] 4a (lib/db/upgrade.php:4316) Expanding the size of the skin_favorites.favorites
[DBG] 4a (lib/db/upgrade.php:4323) Expanding the size of the skin_fonts.variants
[DBG] 4a (lib/db/upgrade.php:4330) Expanding the size of the usr_registration.extra
[DBG] 4a (lib/db/upgrade.php:4339) Removing obsolete Netherlands Antilles ".an" country type
[DBG] 4a (lib/db/upgrade.php:4351) Sorting out block_instance sort order drift
[DBG] 4a (lib/db/upgrade.php:4412) Forcing the multirecipient notification plugin to be the default one
[DBG] 4a (lib/db/upgrade.php:4417) Multirecipient notifications plugin active
[DBG] 4a (lib/db/upgrade.php:4421) Removing the obsolete "view.numcolumns" column
[DBG] 4a (lib/mahara.php:1971) Field numcolumns does not exist. Delete skipped
[DBG] 4a (lib/db/upgrade.php:4428) Expanding the size of the event_log.data
[DBG] 4a (lib/db/upgrade.php:4437) Upgrade openbadgedisplayer plugin
[DBG] 4a (lib/dml.php:157) mysqli error: [1050: Table 'blocktype_openbadgedisplayer_data' already exists] in EXECUTE("CREATE TABLE blocktype_openbadgedisplayer_data (
[DBG] 4a (lib/dml.php:157) id BIGINT(10) NOT NULL auto_increment,
[DBG] 4a (lib/dml.php:157) host VARCHAR(255) NOT NULL,
[DBG] 4a (lib/dml.php:157) uid BIGINT(10) NOT NULL,
[DBG] 4a (lib/dml.php:157) badgegroupid BIGINT(10) NOT NULL,
[DBG] 4a (lib/dml.php:157) name TEXT,
[DBG] 4a (lib/dml.php:157) html TEXT,
[DBG] 4a (lib/dml.php:157) lastupdate DATETIME DEFAULT NULL,
[DBG] 4a (lib/dml.php:157) CONSTRAINT PRIMARY KEY (id)
[DBG] 4a (lib/dml.php:157) )ENGINE=innodb")Command was: CREATE TABLE blocktype_openbadgedisplayer_data (
[DBG] 4a (lib/dml.php:157) id BIGINT(10) NOT NULL auto_increment,
[DBG] 4a (lib/dml.php:157) host VARCHAR(255) NOT NULL,
[DBG] 4a (lib/dml.php:157) uid BIGINT(10) NOT NULL,
[DBG] 4a (lib/dml.php:157) badgegroupid BIGINT(10) NOT NULL,
[DBG] 4a (lib/dml.php:157) name TEXT,
[DBG] 4a (lib/dml.php:157) html TEXT,
[DBG] 4a (lib/dml.php:157) lastupdate DATETIME DEFAULT NULL,
[DBG] 4a (lib/dml.php:157) CONSTRAINT PRIMARY KEY (id)
[DBG] 4a (lib/dml.php:157) )ENGINE=innodb
[WAR] 4a (lib/errors.php:859) Could not execute command: CREATE TABLE blocktype_openbadgedisplayer_data (
[WAR] 4a (lib/errors.php:859) id BIGINT(10) NOT NULL auto_increment,
[WAR] 4a (lib/errors.php:859) host VARCHAR(255) NOT NULL,
[WAR] 4a (lib/errors.php:859) uid BIGINT(10) NOT NULL,
[WAR] 4a (lib/errors.php:859) badgegroupid BIGINT(10) NOT NULL,
[WAR] 4a (lib/errors.php:859) name TEXT,
[WAR] 4a (lib/errors.php:859) html TEXT,
[WAR] 4a (lib/errors.php:859) lastupdate DATETIME DEFAULT NULL,
[WAR] 4a (lib/errors.php:859) CONSTRAINT PRIMARY KEY (id)
[WAR] 4a (lib/errors.php:859) )ENGINE=innodb
Call stack (most recent first):
* log_message(string(size 329), integer, true, true) at /var/www/html/mahara/lib/errors.php:95
* log_warn(string(size 329)) at /var/www/html/mahara/lib/errors.php:859
* SQLException->__construct(string(size 329)) at /var/www/html/mahara/lib/dml.php:158
* execute_sql(string(size 302)) at /var/www/html/mahara/lib/dml.php:1430
* execute_sql_arr(array(size 1)) at /var/www/html/mahara/lib/ddl.php:752
* install_from_xmldb_file(string(size 64)) at /var/www/html/mahara/lib/upgrade.php:417
* upgrade_plugin(object(stdClass)) at /var/www/html/mahara/lib/db/upgrade.php:4439
* xmldb_core_upgrade(string(size 10)) at /var/www/html/mahara/lib/upgrade.php:347
* upgrade_core(object(stdClass)) at /var/www/html/mahara/lib/mahara.php:268
* upgrade_mahara(array(size 1)) at /var/www/html/mahara/admin/cli/upgrade.php:53

[DBG] 4a (lib/ddl.php:753) Array
[DBG] 4a (lib/ddl.php:753) (
[DBG] 4a (lib/ddl.php:753) [0] => CREATE TABLE blocktype_openbadgedisplayer_data (
[DBG] 4a (lib/ddl.php:753) id BIGINT(10) NOT NULL auto_increment,
[DBG] 4a (lib/ddl.php:753) host VARCHAR(255) NOT NULL,
[DBG] 4a (lib/ddl.php:753) uid BIGINT(10) NOT NULL,
[DBG] 4a (lib/ddl.php:753) badgegroupid BIGINT(10) NOT NULL,
[DBG] 4a (lib/ddl.php:753) name TEXT,
[DBG] 4a (lib/ddl.php:753) html TEXT,
[DBG] 4a (lib/ddl.php:753) lastupdate DATETIME DEFAULT NULL,
[DBG] 4a (lib/ddl.php:753) CONSTRAINT PRIMARY KEY (id)
[DBG] 4a (lib/ddl.php:753) )ENGINE=innodb
[DBG] 4a (lib/ddl.php:753) )
[DBG] 4a (lib/ddl.php:753)
[WAR] 4a (lib/errors.php:859) Failed to install (check logs for xmldb errors)
Call stack (most recent first):
* log_message(string(size 47), integer, true, true) at /var/www/html/mahara/lib/errors.php:95
* log_warn(string(size 47)) at /var/www/html/mahara/lib/errors.php:859
* SQLException->__construct(string(size 47)) at /var/www/html/mahara/lib/ddl.php:754
* install_from_xmldb_file(string(size 64)) at /var/www/html/mahara/lib/upgrade.php:417
* upgrade_plugin(object(stdClass)) at /var/www/html/mahara/lib/db/upgrade.php:4439
* xmldb_core_upgrade(string(size 10)) at /var/www/html/mahara/lib/upgrade.php:347
* upgrade_core(object(stdClass)) at /var/www/html/mahara/lib/mahara.php:268
* upgrade_mahara(array(size 1)) at /var/www/html/mahara/admin/cli/upgrade.php:53

[WAR] 4a (lib/ddl.php:754) Failed to install (check logs for xmldb errors)
Call stack (most recent first):
* install_from_xmldb_file(string(size 64)) at /var/www/html/mahara/lib/upgrade.php:417
* upgrade_plugin(object(stdClass)) at /var/www/html/mahara/lib/db/upgrade.php:4439
* xmldb_core_upgrade(string(size 10)) at /var/www/html/mahara/lib/upgrade.php:347
* upgrade_core(object(stdClass)) at /var/www/html/mahara/lib/mahara.php:268
* upgrade_mahara(array(size 1)) at /var/www/html/mahara/admin/cli/upgrade.php:53

A nonrecoverable error occurred. This probably means you have encountered a bug in the system. 

 

How can I fix the problem?

Manson Tong

 

 

09 May 2018, 16:31

Hi Manson,

I suspect the problem you are encountering:

  Upgrade openbadgedisplayer plugin
  mysqli error: [1050: Table 'blocktype_openbadgedisplayer_data' already exists]

Could be because you have openbadgedisplayer plugin installed in your 15.10.8 version (when it was a thirdparty plugin) but by 17.04 it is shipped as part of the core files.

Hence why it is complaining that the database table already exists.

I've made a bug report for it https://bugs.launchpad.net/mahara/+bug/1770069

You should be able to edit the file 'htdocs/blocktype/openbadgedisplayer/db/upgrade.php' like so:

https://reviews.mahara.org/#/c/8839/1/htdocs/blocktype/openbadgedisplayer/db/upgrade.php

And that should check for the table before trying to create it.

Cheers

Robert

Robert Lyon's profile picture
Posts: 756

12 May 2018, 15:44

Hi Manson,

Actually looking at this again the problem is the openbadgedisplayer plugin was trying to install but the database table name already existed.

If there is no data in that table you want to keep the easiest thing to do would be to drop the 'blocktype_openbadgedisplayer_data' table and then run the Mahara upgrade again for that plugin.

If the core upgrade had finished then you should be able to login to your site and go to the Administration dashboard and see a list of plugins waiting to be installed/upgraded - you should be able to run the upgrade for the plugins to finish off the upgrade.

Cheers

Robert

manson tong's profile picture
Posts: 4

24 May 2018, 16:02

Dear Robert, 

Thank you for your advice.

I renamed the table "blocktype_openbadgedisplayer_data" to "blocktype_openbadgedisplayer_data_delete". Then, I ran 

sudo -u www-data php u pgrade.php

again in command mode. There is no more error message and I successfully upgraded it to 17.04.7 . 

Thank you very much.

Manson

4 results