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

Header can be output twice in import script causing a coding_error

XMLWordPrintable

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

      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.

            nmagill Neill Magill
            nmagill Neill Magill
            Dan Poltawski Dan Poltawski
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Jake Dallimore Jake Dallimore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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