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

Header can be output twice in import script causing a coding_error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.15, 2.8.12, 2.9.7, 3.0.5, 3.1.1, 3.2
    • Fix Version/s: 3.0.6, 3.1.2
    • Component/s: Backup
    • Labels:

      Description

      During the final stage of an import if the pre-check fails, rather than the cause of the failure being displayed there is a coding_error with the following message:

      Coding error detected, it must be fixed by a programmer: Invalid state passed to moodle_page::set_state. We are in state 2 and state 1 was requested.
      

      This appears to be caused because in this case the renderer is instructed to output the Moodle page header for a second time

      In backup/import.php during the final stage the header is output on line 91, in the case of a pre-check fail it is output again on line 148.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Sep/16