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

Error when viewing 'restore page' link during asynchronous course restore

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.7.3, 3.8.1, 3.9
    • Fix Version/s: 3.7.6, 3.8.3
    • Component/s: Backup
    • Labels:
    • Testing Instructions:
      Hide
      1. Ensure cron is disabled (this gives time to view the restore page before the process completes)
      2. Login as admin
      3. Navigate to Courses > Backups > Asynchronous backup/restore in site administration
      4. Tick Enable asynchronous backups and save changes
      5. Create a new course
      6. Press the Actions menu and select Restore
      7. Under Import a backup file upload backup-moodle2-course-3-lovely-20200313-2336-nu.mbz and press Restore
      8. Press Continue
      9. Select Delete the contents of this course and then restore and press Continue
      10. Press Next
      11. Press Next (again)
      12. Press Perform restore
      13. Under the heading The restore process is pending press the link in the text You can check the progress at any time on the restore page.
      14. Confirm the Restores in progress table displays the status as Process pending
      15. Enable cron and let the async restore complete
      16. Confirm the Restores in progress table displays the status as a tick (success) - this happens asynchronously, you may need to wait a few seconds
      Show
      Ensure cron is disabled (this gives time to view the restore page before the process completes) Login as admin Navigate to Courses > Backups > Asynchronous backup/restore in site administration Tick Enable asynchronous backups and save changes Create a new course Press the Actions menu and select Restore Under Import a backup file upload backup-moodle2-course-3-lovely-20200313-2336-nu.mbz and press Restore Press Continue Select Delete the contents of this course and then restore and press Continue Press Next Press Next (again) Press Perform restore Under the heading The restore process is pending press the link in the text You can check the progress at any time on the restore page . Confirm the Restores in progress table displays the status as Process pending Enable cron and let the async restore complete Confirm the Restores in progress table displays the status as a tick (success) - this happens asynchronously, you may need to wait a few seconds
    • Affected Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Pull 3.8 Branch:
    • Pull Master Branch:

      Description

      Description:

      When deleting contents and restoring into a course, if a user clicks the 'restore page' link in the given message (async backup/restore) an error is generated

      Prerequisites:

      Asynchronous backup/restore enabled in <site>/admin/settings.php?section=asyncgeneralsettings

      Go any course and run a full backup to generate an MBZ file

      Steps to replicate:

      1. Access a course
      2. Course Administration>Restore>Drag and drop the backup file
      3. Click on Restore
      4. Click on Continue
      5. Select the option 'Delete the contents of this course then restore' option under 'Restore into this course' and click on Continue
      6. Click on Next, Next, Perform restore.
      7. In the message below, click on the hyperlink 'Restore page' while the restore is pending

      Observed result:

      Error message appears

      error/setting_by_name_not_found

      More information about this error

      ×Debug info:
      Error code: setting_by_name_not_found
      $a contents: filename
      ×Stack trace:
      line 124 of /backup/util/plan/base_plan.class.php: base_plan_exception thrown
      line 314 of /backup/util/helper/async_helper.class.php: call to base_plan->get_setting()
      line 606 of /backup/util/ui/renderer.php: call to async_helper::get_async_backups()
      line 462 of /lib/outputrenderers.php: call to core_backup_renderer->render_backup_files_viewer()
      line 541 of /backup/util/ui/renderer.php: call to plugin_renderer_base->render()
      line 166 of /backup/restorefile.php: call to core_backup_renderer->backup_files_viewer()

      Expected result:

      Page appears with status of the restore

        Attachments

          Activity

            People

            Assignee:
            pholden Paul Holden
            Reporter:
            prankin Phillip Rankin
            Peer reviewer:
            Mihail Geshoski
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Anna Carissa Sadia
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/May/20

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 5 minutes
                2h 5m