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

Restore doesn't handle deleted users

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Backup
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Create a backup of a course. Include everything. Now delete a user and try to restore your backup. The restore fails with the below error. Restore should probably just drop any data for a user that has been deleted in the time since the backup was done.

      Coding error detected, it must be fixed by a programmer: User ID does not exist or is deleted!

      More information about this error
      Debug info: userid:4
      Stack trace:

      • line 2535 of /lib/accesslib.php: coding_exception thrown
      • line 869 of /backup/moodle2/restore_stepslib.php: call to role_assign()
      • line 119 of /backup/util/plan/restore_structure_step.class.php: call to restore_ras_and_caps_structure_step->process_assignment()
      • 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 116 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 161 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
      • line 235 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
      • line ? of unknownfile: call to progressive_parser->end_tag()
      • line 150 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 99 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
      • line 143 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 123 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
      • line 278 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()

        Attachments

          Activity

            People

            • Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              andyjdavis Andrew Davis
              Tester:
              Nobody
              Participants:
              Component watchers:
              Adrian Greeve, Mihail Geshoski, Peter Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10