Error update from 3.11 to 4.16

Error update from 3.11 to 4.16

by Andreas R. -
Number of replies: 11
Hi all

We try update from Moodle 3.11 to 4.1.6, comes this error. Any ideas?

Unbekannter DDL Library Fehler

Debug-Info:  Field question_bank_entries->questionid cannot be added. Not null fields added to non empty tables require default value. Create skipped
Error code: ddlunknownerror Stack trace:

    line 540 of /lib/ddl/database_manager.php: ddl_exception thrown
    line 2224 of /lib/db/upgrade.php: call to database_manager->add_field()
    line 1891 of /lib/upgradelib.php: call to xmldb_main_upgrade()
    line 527 of /admin/index.php: call to upgrade_core()

Greets Andy
Average of ratings: -
In reply to Andreas R.

Re: Error update from 3.11 to 4.16

by Ken Task -
Picture of Particularly helpful Moodlers
Under ... *any* ideas ....

Ahhhhhh  the hyperjump from 3.x skipping the first version of a new series (4.x)!
Thought it always wise to do the first jump from lower to the first in series - 4.0
Then 4.0 to higher 4.x.

In 4.0 there was a column added to a table.
Hyperjump from 3.11 to 4.1 doesn't account for that.

So try 3.11 -> 4.0 first, then 4.0 to 4.1

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Error update from 3.11 to 4.16

by Luis de Vasconcelos -
Picture of Particularly helpful Moodlers
Isn't that then a bug in the Moodle installer? Shouldn't the 4.1 installer account for the new column?
In reply to Luis de Vasconcelos

Re: Error update from 3.11 to 4.16

by Ken Task -
Picture of Particularly helpful Moodlers
Yes, probably is a bug, but considering how long one might have to wait for the fix, marching through 4.0 briefly first then to 4.1 might be the 'fastest' way forward at this point. smile

'SoS', Ken

In reply to Andreas R.

Re: Error update from 3.11 to 4.16

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers
It looks there was a previous attempt to upgrade, and then an attempt to restore the pre-upgrade database. But this restore was not done correctly because a table from the new version (mdl_question_bank_entries) was left behind. This reply has more details but basically you need to restore the 3.11 database ensuring any new 4.1 tables are not present. For example, delete and recreate the Moodle database before restoring the 3.11 database, or determine the new 4.1 tables and remove these.
Average of ratings: Useful (4)
In reply to Leon Stringer

Re: Error update from 3.11 to 4.16

by Andreas R. -
Problem solved! Thx Leon we did it in that way, we must drop some tables more, but then it works!

Greets Andy
Average of ratings: Useful (1)
In reply to Andreas R.

Re: Error update from 3.11 to 4.16

by Andreas R. -
Ok now we have the following problem when we try backup a course

Fehler: Class 'backup_quiz_activity_task' not found

Any help?

Greets Andy
In reply to Andreas R.

Re: Error update from 3.11 to 4.16

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Is the file mod/quiz/backup/moodle2/backup_quiz_activity_task.class.php present in the Moodle source code folder? This file isn't new, it was certainly part of Moodle 3.11.

If the file is present and has the expected contents enable debugging to see if any more details are displayed with the error.

Average of ratings: Useful (1)
In reply to Leon Stringer

Re: Error update from 3.11 to 4.16

by Andreas R. -
Hey Leon

Fehler: Class 'backup_quiz_activity_task' not found

Weitere Informationen über diesen Fehler
Debug-Info:
Error code: generalexceptionmessage
Stack trace:

line 107 of /backup/util/factories/backup_factory.class.php: Error thrown
line 134 of /backup/moodle2/backup_plan_builder.class.php: call to backup_factory::get_backup_activity_task()
line 168 of /backup/moodle2/backup_plan_builder.class.php: call to backup_plan_builder::build_activity_plan()
line 189 of /backup/moodle2/backup_plan_builder.class.php: call to backup_plan_builder::build_section_plan()
line 102 of /backup/moodle2/backup_plan_builder.class.php: call to backup_plan_builder::build_course_plan()
line 163 of /backup/util/factories/backup_factory.class.php: call to backup_plan_builder::build_plan()
line 67 of /backup/util/plan/backup_plan.class.php: call to backup_factory::build_plan()
line 628 of /backup/controller/backup_controller.class.php: call to backup_plan->build()
line 210 of /backup/controller/backup_controller.class.php: call to backup_controller->load_plan()
line 126 of /backup/backup.php: call to backup_controller->__construct()

Greets Andy
In reply to Leon Stringer

Re: Error update from 3.11 to 4.16

by Andreas R. -
The folder moodle 2 and file mod/quiz/backup/moodle2/backup_quiz_activity_task.class.php are not present. In the folder moodle/backup/moodle2 the file is present.

Greets Andy
In reply to Andreas R.

Re: Error update from 3.11 to 4.16

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

The folder moodle 2 and file mod/quiz/backup/moodle2/backup_quiz_activity_task.class.php are not present.

So the source code files in mod/quiz/backup/moodle2 are missing on your site? Then that is why you're getting an error.

You can get the Moodle 4.1.6 files from download.moodle.org and extract just this missing folder. But I suggest replacing all your Moodle source code by updating to the latest 4.1.6+ weekly release, because if one folder is missing maybe others are missing too.

Average of ratings: Useful (1)