Error when exporting/importing between courses

Error when exporting/importing between courses

by Steve Rippl -
Number of replies: 0

[Originally posted under the 'Databases' forum, but no response so I'm trying here!]

Older site (originally 1.9), recently upgraded to 2.3.1 from 2.2, also migrated db from MySQL to Postgres.  I have a user that in the past has always exported/imported elements between his courses successfully.  Now he hits the following error...

Debug info: ERROR: invalid input syntax for integer: ""
SELECT * FROM mdl_backup_ids_temp WHERE backupid = $1 AND itemname = $2 AND itemid = $3
[array (
0 => 'd99e01f0040a9084705ff915ea6814ed',
1 => 'question_match_sub',
2 => '',
)]
Error code: dmlreadexception
Stack trace:
  • line 407 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 239 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
  • line 708 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
  • line 1346 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->get_records_sql()
  • line 1318 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
  • line 1297 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
  • line 223 of /backup/util/dbops/restore_dbops.class.php: call to moodle_database->get_record()
  • line 1469 of /backup/util/dbops/restore_dbops.class.php: call to restore_dbops::get_backup_ids_cached()
  • line 213 of /backup/util/plan/restore_structure_step.class.php: call to restore_dbops::get_backup_ids_record()
  • line 205 of /backup/util/plan/restore_structure_step.class.php: call to restore_structure_step->get_mapping()
  • line 204 of /backup/moodle2/restore_plugin.class.php: call to restore_structure_step->get_mappingid()
  • line 172 of /question/type/match/backup/moodle2/restore_qtype_match_plugin.class.php: call to restore_plugin->get_mappingid()
  • line 84 of /backup/moodle2/restore_plugin.class.php: call to restore_qtype_match_plugin->after_execute_question()
  • line 355 of /backup/util/plan/restore_structure_step.class.php: call to restore_plugin->launch_after_execute_methods()
  • line 108 of /backup/util/plan/restore_structure_step.class.php: call to restore_structure_step->launch_after_execute_methods()
  • line 153 of /backup/util/plan/base_task.class.php: call to restore_structure_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()

 

Folks building new courses in the updated Moodle are not experiencing this, so far just him with his older courses.  Came across a reference elsewhere about Postgres not liking empty strings for NULL values (http://moodle.org/mod/forum/discuss.php?d=203460&parent=888204), looks similar on the surface of it.

Any ideas how I fix this?

Many thanks,
Steve

Average of ratings: -