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

Coding error detected, it must be fixed by a programmer: $PAGE->context accessed before it was known.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      There are lots of fatal errors caused by pages that don't set context properly before strings etc try to use context:

      "Coding error detected, it must be fixed by a programmer: $PAGE->context accessed before it was known."

      Sam put in a fix some months ago to avoid this, by defaulting to SYSTEM context in these cases, which avoided the problem. Petr reverted citing security issues.

      Currently this is breaking Moodle, so we need to fix it.

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            dougiamas Martin Dougiamas
            Tester:
            Nobody
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              24/Nov/10