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

Restore fails if there is local settings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 2.1.3, 2.2.2, 2.3
    • Backup

      Discussion at http://moodle.org/mod/forum/discuss.php?d=200428

      I upload the file, click restore, and get presented with the error under step 1. Confirm:

      error/wrong_setting_level_moodle_backup_xml_file

      The restore is dying because the file moodle_backup.xml has some invalid 'levels' in lines like this:
      <moodlebackup>
      ...
      <information>
      ...
      <settings>
      ...
      <setting>
      <level>local</level>
      <name>pld_logs_included</name>
      <value>0</value>
      </setting>

      If you edit backup/util/helper/backup_general_helper.php in the function get_backup_information() line ~204 says

      throw new backup_helper_exception('wrong_setting_level_moodle_backup_xml_file', $setting['level']);

      Add the first line below and comment out that "throw new..." line like this:

      continue; //added this line to prevent stopping on <level>local</level>
      //throw new backup_helper_exception('wrong_setting_level_moodle_backup_xml_file', $setting['level']);

      The backup will happily chug along now. Tested in 2.1.3 (Build 20111128) (201170103).

        1. Math 1050.mbz
          1.02 MB
          Aparup Banerjee
        2. Math 1050.mbz
          1.02 MB
          Helen Foster

            nebgor Aparup Banerjee
            mwebster Mark van Hoek
            David Monllaó David Monllaó
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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