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

Some backups do restore on Mysql but not on postgres (some kind of issue with empty itemid)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.2.5, 2.3.2
    • 2.0.2, 2.1.4, 2.2.1
    • Backup

      Try to restore this course on postgres: http://hub.moodle.org/local/hub/webservice/download.php?courseid=46&filetype=backup&remotemoodleurl=http%3A%2F%2Fhub.moodle.org

      After perform restore button you see:

      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 => 'e9e378ea1e5dd0a80eac3ca55300f321',
      1 => 'question_answer',
      2 => '',
      )]Stack trace:line 391 of /lib/dml/moodle_database.php: dml_read_exception thrownline 232 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()line 672 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()line 1256 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->get_records_sql()line 1228 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()line 1208 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()line 1257 of /backup/util/dbops/restore_dbops.class.php: call to moodle_database->get_record()line 210 of /backup/util/plan/restore_structure_step.class.php: call to restore_dbops::get_backup_ids_record()line 202 of /backup/util/plan/restore_structure_step.class.php: call to restore_structure_step->get_mapping()line 179 of /backup/moodle2/restore_plugin.class.php: call to restore_structure_step->get_mappingid()line 73 of /question/type/shortanswer/backup/moodle2/restore_qtype_shortanswer_plugin.class.php: call to restore_plugin->get_mappingid()line 131 of /backup/util/plan/restore_structure_step.class.php: call to restore_qtype_shortanswer_plugin->process_shortanswer()line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()line 106 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()line 91 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()line 132 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()line 169 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()line 253 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()line ? of unknownfile: call to progressive_parser->end_tag()line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()line 137 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()line 105 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()line 153 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()line 148 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 299 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()line 144 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()line 39 of /backup/restore.php: call to restore_ui->execute()

      The error (discovered by Apu) is due to postgres wanting a integer and receving ''. Let me know if the backup if faulty because the backup comes from Mooch.

      Thank you.

            nebgor Aparup Banerjee
            jerome Jérôme Mouneyrac
            Tim Hunt Tim Hunt
            Dan Poltawski Dan Poltawski
            Rossiani Wijaya Rossiani Wijaya
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.