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

Exceptions thrown during a restore and being mangled and unreadable.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.1.3
    • 2.2
    • Backup
    • MOODLE_22_STABLE
    • MOODLE_21_STABLE
    • wip-mdl-30391
    • Hide

      Note: Testing needs developer to modify code

      1. Open backup/restore.php for editing
      2. Add exception just before restore->execute() on line 46

        throw new moodle_exception("Testing");

      3. Log in as admin
      4. Select an existing course or create new course.
      5. Backup an existing/new course (settings -> backup)
      6. Restore this course as new course
        • Start restore process (settings -> restore -> click on restore link)
        • Confirm details (Press continue)
        • Restore as a new course (In top section "Restore as a new course" select a category and click continue)
        • Press next on settings and Schema page
        • On review page click perform restore
      7. you should not see error message like :

        error/exception 'moodle_exception' with message 'error/Testing' in /usr/local/www/moodle/backup/restore.php:46 Stack trace: #0 {main}

      8. Message should be proper message, with proper Debug information (If debugging is set to developer)

        Coding error detected, it must be fixed by a programmer: PHP catchable fatal error

      Show
      Note: Testing needs developer to modify code Open backup/restore.php for editing Add exception just before restore->execute() on line 46 throw new moodle_exception("Testing"); Log in as admin Select an existing course or create new course. Backup an existing/new course (settings -> backup) Restore this course as new course Start restore process (settings -> restore -> click on restore link) Confirm details (Press continue) Restore as a new course (In top section "Restore as a new course" select a category and click continue) Press next on settings and Schema page On review page click perform restore you should not see error message like : error/exception 'moodle_exception' with message 'error/Testing' in /usr/local/www/moodle/backup/restore.php:46 Stack trace: #0 {main} Message should be proper message, with proper Debug information (If debugging is set to developer) Coding error detected, it must be fixed by a programmer: PHP catchable fatal error

      There is a regression from MDL-27790 whereby exceptions occurring during a restore are being output into a new exception and thrown again.
      This leads to those exceptions being output looking like garbage and making them very hard to read.
      Surely the code should just be throwing the existing exception when it has done what it needs to?

            rajeshtaneja Rajesh Taneja
            samhemelryk Sam Hemelryk
            Jason Fowler Jason Fowler
            Sam Hemelryk Sam Hemelryk
            Sam Hemelryk Sam Hemelryk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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