Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-43457

Error in backup restore

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.2.11, 2.4.7, 2.5.3, 2.6
    • Fix Version/s: None
    • Component/s: Backup, Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE

      Description

      When restore a backup with some kind of question we obtain this 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 => 'c0b9885ca347e1c38ecbee4c71c7a950',
      1 => 'question',
      2 => '',
      )]
      Error code: dmlreadexception
      Stack trace:
      line 423 of /lib/dml/moodle_database.php: dml_read_exception thrown
      line 248 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      line 753 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      line 1397 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->get_records_sql()
      line 1369 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
      line 1348 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 1511 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 107 of /question/type/multianswer/backup/moodle2/restore_qtype_multianswer_plugin.class.php: call to restore_plugin->get_mappingid()
      line 84 of /backup/moodle2/restore_plugin.class.php: call to restore_qtype_multianswer_plugin->after_execute_question()
      line 362 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 167 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 147 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
      line 46 of /backup/restore.php: call to restore_ui->execute()

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              panidvd David Paniagua Ruano
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: