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

Header can be output twice in import script causing a coding_error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.7.15, 2.8.12, 2.9.7, 3.0.5, 3.1.1, 3.2
    • 3.0.6, 3.1.2
    • Backup

    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

            nmagill Neill Magill
            nmagill Neill Magill
            Dan Poltawski Dan Poltawski
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Jake Dallimore Jake Dallimore
            Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              12/Sep/16