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

Headers output before redirect when cancelling a backup

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6, 3.4.3, 3.5, 3.6
    • Fix Version/s: 3.4.5, 3.5.2
    • Component/s: Backup
    • Labels:
    • Testing Instructions:
      Hide

      Backup

      1. Open a course
      2. Start a backup  (Select "Backup" from the cog menu on course home page)
      3. Proceed to the second page of the backup process
      4. Click the Cancel button 
      5. Confirm the buttons on the confirm cancel dialogue say "Cancel backup" and "Do not cancel".
      6. Click "Do not cancel"
      7. Confirm you stay on the backup page and the cancel dialogue closes
      8. Click the Cancel button again
      9. Click "Cancel backup" button in the dialogue.
      10. Confirm the dialogue closes and you are taken to the course page with no debugging messages.

      Import

      1. Start an import (Select "Import" from the cog menu on course home page)
      2. Select a course to import from
      3. Click the Cancel button 
      4. Confirm the buttons on the confirm cancel dialogue say "Cancel import" and "Do not cancel".
      5. Click "Do not cancel"
      6. Confirm you stay on the import page and the cancel dialogue closes
      7. Click the Cancel button again
      8. Click "Cancel import" button in the dialogue.
      9. Confirm the dialogue closes and you are taken to the course page with no debugging messages.

      Restore

      1. Start the restore process (Select "Restore" from the cog menu on course home page)
      2. Upload a course backup file to restore from
      3. Click the "Restore" button to restore from the backup file
      4. Click the "Continue" button
      5. Select a course to restore into and click the "Continue" button again
      6. Click the Cancel button 
      7. Confirm the buttons on the confirm cancel dialogue say "Cancel restore" and "Do not cancel".
      8. Click "Do not cancel"
      9. Confirm you stay on the restore page and the cancel dialogue closes
      10. Click the Cancel button again
      11. Click "Cancel restore" button in the dialogue.
      12. Confirm the dialogue closes and you are taken to the course page with no debugging messages.
      Show
      Backup Open a course Start a backup  (Select "Backup" from the cog menu on course home page) Proceed to the second page of the backup process Click the Cancel button  Confirm the buttons on the confirm cancel dialogue say "Cancel backup" and "Do not cancel". Click "Do not cancel" Confirm you stay on the backup page and the cancel dialogue closes Click the Cancel button again Click "Cancel backup" button in the dialogue. Confirm the dialogue closes and you are taken to the course page with no debugging messages. Import Start an import (Select "Import" from the cog menu on course home page) Select a course to import from Click the Cancel button  Confirm the buttons on the confirm cancel dialogue say "Cancel import" and "Do not cancel". Click "Do not cancel" Confirm you stay on the import page and the cancel dialogue closes Click the Cancel button again Click "Cancel import" button in the dialogue. Confirm the dialogue closes and you are taken to the course page with no debugging messages. Restore Start the restore process (Select "Restore" from the cog menu on course home page) Upload a course backup file to restore from Click the "Restore" button to restore from the backup file Click the "Continue" button Select a course to restore into and click the "Continue" button again Click the Cancel button  Confirm the buttons on the confirm cancel dialogue say "Cancel restore" and "Do not cancel". Click "Do not cancel" Confirm you stay on the restore page and the cancel dialogue closes Click the Cancel button again Click "Cancel restore" button in the dialogue. Confirm the dialogue closes and you are taken to the course page with no debugging messages.
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
    • Pull Master Branch:
      MDL-43334-master

      Description

      1. Set "Site administration → Development → Debugging → Debug messages" to "DEVELOPER: extra Moodle debug messages for developers".
      2. Create a course.
      3. Under Course administration, click Backup
      4. On the Initial settings step, click Cancel. Confirm the confirmation dialogue.
      5. The following debug message is being displayed:

        You should really redirect before you start page output
        line 902 of /lib/outputrenderers.php: call to debugging()
        line 2739 of /lib/weblib.php: call to core_renderer->redirect_message()
        line 279 of /backup/util/ui/base_ui.class.php: call to redirect()
        line 99 of /backup/util/ui/backup_ui_stage.class.php: call to base_ui->cancel_process()
        line 136 of /backup/util/ui/base_ui.class.php: call to backup_ui_stage_initial->process()
        line 113 of /backup/backup.php: call to base_ui->process()

      Though this might not occur in an actual production environment, I think it would be better to have this properly dealt with.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Sep/18

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h