Upgrade form 1.10 to 15.04 fails if 3rd party plugins are not present
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Aaron Wells | ||
15.04 |
Fix Released
|
High
|
Aaron Wells | ||
15.10 |
Fix Released
|
High
|
Aaron Wells |
Bug Description
When upgrading from 1.10 (latest build) to 15.04 (latest build) today I get the following error because some 3rd party plugins are not present on my server but, due to the lack on auto-unstallation, their traces remain in the database.
If I run again the command later I get the second error message (see below).
The upgrade process should be resilient when 3rd party plugins are not here. I think we already had this with previous versions of Mahara and it has been fixed. My only way to upgrade to 15.04 is either :
1/ Find all the bit of information related to the missing plugins and delete them from the database
or
2/ Reinstall everything from scratch loosing all the data from the Groups (no option to export group work in Leap2a)
or
3/ Reinstall the missing plugins. I already tried this solution without success; some plugins are so old and unmaintaned that they crash the server when re-introduced inside Mahara.
---- Message I got after the first attempt for upgrading the system
root@ubuntu:
[INF] 61 (admin/
[INF] 61 (lib/mahara.
[WAR] 61 (lib/mahara.
Call stack (most recent first):
* safe_require(
* install_
* xmldb_core_
* upgrade_
* upgrade_
A nonrecoverable error occurred. This probably means you have encountered a bug in the systemroot@
------- Message I got after my second attempt
root@ubuntu:
[INF] 87 (admin/
[INF] 87 (lib/mahara.
[WAR] 87 (lib/errors.
[WAR] 87 (lib/errors.
Call stack (most recent first):
* log_message("Failed to get a recordset: mysqli error: [1062: Du...", 8, true, true) at /var/www/
* log_warn("Failed to get a recordset: mysqli error: [1062: Du...") at /var/www/
* SQLException-
* insert_
* xmldb_core_
* upgrade_
* upgrade_
[WAR] 87 (lib/dml.php:1054) Failed to get a recordset: mysqli error: [1062: Duplicate entry 'shortcut' for key 'PRIMARY'] in adodb_throw(INSERT INTO "blocktype_
[WAR] 87 (lib/dml.php:1054) Command was: INSERT INTO "blocktype_
Call stack (most recent first):
* insert_
* xmldb_core_
* upgrade_
* upgrade_
A nonrecoverable error occurred. This probably means you have encountered a bug in the systemroot@
tags: | added: upgrade |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Confirmed. This does not happen when upgrading from 1.9 -> 1.10. It appears that it's due to the blocktype category code that we added in 15.04 to store block sortorders.
While we don't yet support fully uninstalling plugins (that's bug 505732), Mahara shouldn't crash like this if you've just deleted the plugin.
Another possible workaround to those listed above, would be to put in a "dummy" placeholder plugin with no functionality, but with the same name as the expected plugin. But I'm going to try to get this bug fixed for 15.04.1.
Cheers,
Aaron