Databases: Error when importing/exporting/restoring a course

Databases: Error when importing/exporting/restoring a course

by Conrad Allen -
Number of replies: 2

We have upgraded from 1.9 to 2.2 and 2.3.1 and have the following debug code when trying to import.

 

Debug info: Unknown column 't.intro' in 'field list'
SELECT t.id, t.intro
FROM mdl_book t
JOIN mdl_backup_ids_temp b ON b.newitemid = t.id
WHERE b.backupid = ?
AND b.itemname = ?
[array (
0 => '9ddbacbac2db507c85aa071db40a3e01',
1 => 'book',
)]
Error code: dmlreadexception
Stack trace:
  • line 407 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 903 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 103 of /backup/util/helper/restore_decode_content.class.php: call to mysqli_native_moodle_database->get_recordset_sql()
  • line 72 of /backup/util/helper/restore_decode_content.class.php: call to restore_decode_content->get_iterator()
  • line 81 of /backup/util/helper/restore_decode_processor.class.php: call to restore_decode_content->process()
  • line 424 of /backup/moodle2/restore_stepslib.php: call to restore_decode_processor->execute()
  • line 34 of /backup/util/plan/restore_execution_step.class.php: call to restore_decode_interlinks->define_execution()
  • line 153 of /backup/util/plan/base_task.class.php: call to restore_execution_step->execute()
  • line 163 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
  • line 157 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
  • line 315 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
  • line 130 of /backup/import.php: call to restore_controller->execute_plan()

 

Any ideas on how to resolve this? Is it something not jiving with the built-in book module?

Many thanks!

Average of ratings: -
In reply to Conrad Allen

Re: Databases: Error when importing/exporting/restoring a course

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Conrad,

yes, that's one known problem happening in sites updated to Moodle 2.3 (that includes mod_book within core) that were running old versions of the book @ contrib.

It's being fixed @ MDL-35297 and the solution will arrive, hopefully, next week.

Ciao smile

Average of ratings: Useful (1)
In reply to Conrad Allen

Re: Databases: Error when importing/exporting/restoring a course

by james mergenthaler -

try not using the alias in the select list, try mdl_book.id, mdl_book.intro could it be that simple?