Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
3.0
-
MOODLE_30_STABLE
-
MOODLE_30_STABLE
-
-
Description
Error
During the upgrade to Moodle 3.0 from 2.4.10 (via CLI). When it upgrade the qtype plugins, it show this error:
++ Success ++
|
-->qtype_match
|
++ Success ++
|
-->qtype_missingtype
|
++ Success ++
|
-->qtype_multianswer
|
!!! Table "qtype_multichoice_options" does not exist !!! |
!!
|
Error code: ddltablenotexist !!
|
!! Stack trace: * line 585 of /lib/dml/moodle_database.php: dml_exception thrown
|
* line 1428 of /lib/dml/moodle_database.php: call to moodle_database->where_clause()
|
* line 76 of /question/type/multianswer/db/upgrade.php: call to moodle_database->get_record()
|
* line 545 of /lib/upgradelib.php: call to xmldb_qtype_multianswer_upgrade()
|
* line 1641 of /lib/upgradelib.php: call to upgrade_plugins()
|
* line 171 of /admin/cli/upgrade.php: call to upgrade_noncore()
|
!!
|
I found in line 76 of */question/type/multianswer/db/upgrade.php * that in fact, it seeks qtype_multichoise_option table but it does not exist.
I have seen in question/type/multichoice/db/upgrade.php that this table is renamed to qtype_multichoice_options in one of the upgrade steps as I show below.
if ($oldversion < 2013092301) {
|
|
// Define table question_multichoice to be renamed to qtype_multichoice_options.
|
$table = new xmldb_table('question_multichoice');
|
|
// Launch rename table for question_multichoice.
|
$dbman->rename_table($table, 'qtype_multichoice_options');
|
|
// Record that qtype_match savepoint was reached.
|
upgrade_plugin_savepoint(true, 2013092301, 'qtype', 'multichoice');
|
}
|
I think is a core issue becouse it should upgrade first qtype_multichoice and then qtype_multipleanswer.
This issue can only be reproduced upgrading from any version lower than 2.6 to moodle 3.0 via CLI. In this case, from moodle 2.4.
FULL STEPS
time /usr/bin/php /var/www/html/moodle/admin/cli/upgrade.php --non-interactive | tee /log/"`date +"%Y%m%d_%H%M"`_upgrade.log"
|
I know that I can upgrade first to any version lower than moodle 3.0 and then to 3.0, but i think it shouldn't occur.
Attachments
Issue Links
- will be (partly) resolved by
-
MDL-52298 Improve install & upgrade to better support inter-plugin dependencies
-
- Closed
-