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

Old update post log rules are not parsed during restore

    Details

    • Testing Instructions:
      Hide

      This needs to be tested in all databases

      1. Goto a forum in a course
      2. update any two post
      3. Goto site admin>reports>live logs and make sure the log is in the format discuss.php?d=5565#p2&parent=19321
      4. Goto your database editor and edit one of these log entries and remove #p2 part only (mdl_logs)
      5. Backup the course with Include course logs checked
      6. Restore the course as new course on same site
      7. Make sure you get no errors during restore and the entries in the log report for this course are imported without any errors.
      Show
      This needs to be tested in all databases Goto a forum in a course update any two post Goto site admin>reports>live logs and make sure the log is in the format discuss.php?d=5565#p2&parent=19321 Goto your database editor and edit one of these log entries and remove #p2 part only (mdl_logs) Backup the course with Include course logs checked Restore the course as new course on same site Make sure you get no errors during restore and the entries in the log report for this course are imported without any errors.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull Master Branch:
      MDL-37295-master

      Description

      when restoring a course with forum activities + its user data in it with its
      user data. (via the Restore link, selecting the latest backup, including
      user data, excluding grade history). and this happen

      Starting restore
      Processing course.

      Error reading from database

      More information about this error
      Debug info: ERROR: invalid input syntax for integer: "5565&parent=19321"
      SELECT * FROM mdl_backup_ids_temp WHERE backupid = $1 AND itemname = $2 AND itemid = $3
      [array (
      0 => 'cadf23eacb4f9fc83b5e098cf57ae3a8',
      1 => 'forum_discussion',
      2 => '5565&parent=19321',
      )]
      Error code: dmlreadexception
      Stack trace:

      line 409 of /lib/dml/moodle_database.php: dml_read_exception thrown
      line 242 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      line 720 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      line 1352 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->get_records_sql()
      line 1324 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
      line 1303 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 1521 of /backup/util/dbops/restore_dbops.class.php: call to restore_dbops::get_backup_ids_cached()
      line 197 of /backup/util/helper/restore_log_rule.class.php: call to restore_dbops::get_backup_ids_record()
      line 137 of /backup/util/helper/restore_log_rule.class.php: call to restore_log_rule->parse_tokens_and_matches()
      line 84 of /backup/util/helper/restore_logs_processor.class.php: call to restore_log_rule->process()
      line 2170 of /backup/moodle2/restore_stepslib.php: call to restore_logs_processor->process_log_record()
      line 131 of /backup/util/plan/restore_structure_step.class.php: call to restore_activity_logs_structure_step->process_log()
      line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
      line 125 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 148 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 194 of /backup/moodle2/restore_activity_task.class.php: call to base_task->execute()
      line 163 of /backup/util/plan/base_plan.class.php: call to restore_activity_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 59 of /backup/restore.php: call to restore_ui->execute()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    11/Mar/13