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

Editting any block on a course module page throws error about context

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3
    • Component/s: Blocks
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Steps to reproduce:

      1) Go to a course, switch editing on
      2) Go to a course module page (e.g. forum/view.php)
      3) Click edit setting on any block

      Expected result
      ---------------
      No errors

      Actual Result
      -------------
      Coding problem: unsupported modification of PAGE->context level from 80 to 70
      line 768 of /lib/pagelib.php: call to debugging()
      line 807 of /lib/pagelib.php: call to moodle_page->set_context()
      line 1157 of /lib/blocklib.php: call to moodle_page->set_cm()
      line 1040 of /lib/blocklib.php: call to block_manager->process_url_edit()
      line 1184 of /lib/pagelib.php: call to block_manager->process_url_actions()
      line 702 of /lib/pagelib.php: call to moodle_page->starting_output()
      line 600 of /lib/outputrenderers.php: call to moodle_page->set_state()
      line 110 of /mod/forum/view.php: call to core_renderer->header()
      Skip to main content
      Configuring a Navigation block
      You are logged in as Admin User (Logout)
      Page path

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            dobedobedoh Andrew Nicols added a comment -

            Quick bit of git bisecting gives seems to suggest that commit 4478743ca4baca9ca6f6da7ab31c03f4fc04bb22 introduced this bug

            Changes to lib/pagelib.php's moodle_page->set_cm() seem to be the cause
            These changes relate to MDL-26265

            Show
            dobedobedoh Andrew Nicols added a comment - Quick bit of git bisecting gives seems to suggest that commit 4478743ca4baca9ca6f6da7ab31c03f4fc04bb22 introduced this bug Changes to lib/pagelib.php's moodle_page->set_cm() seem to be the cause These changes relate to MDL-26265
            Hide
            skodak Petr Skoda added a comment -

            WOW - this block editing code looks crazy! I would never imagine anybody could hijack a moodle page like this, the block edit icons should redirect to a separate page and pass around some return context information.

            Show
            skodak Petr Skoda added a comment - WOW - this block editing code looks crazy! I would never imagine anybody could hijack a moodle page like this, the block edit icons should redirect to a separate page and pass around some return context information.
            Hide
            skodak Petr Skoda added a comment -

            Hello, I have tried to create a workaround, hopefully it will be accepted and will land in the next weekly build.

            Thanks for the report and other info.

            Petr

            Show
            skodak Petr Skoda added a comment - Hello, I have tried to create a workaround, hopefully it will be accepted and will land in the next weekly build. Thanks for the report and other info. Petr
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Reopening as asked

            Show
            samhemelryk Sam Hemelryk added a comment - Reopening as asked
            Hide
            skodak Petr Skoda added a comment -

            PULL with ugly workaround submitted, thanks!

            Show
            skodak Petr Skoda added a comment - PULL with ugly workaround submitted, thanks!
            Hide
            tsala Helen Foster added a comment -

            This issue is fixed in this week's 2.0.2+. Thanks everyone

            Show
            tsala Helen Foster added a comment - This issue is fixed in this week's 2.0.2+. Thanks everyone

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/May/11