Moodle
  1. Moodle
  2. MDL-26881

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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
    • Rank:
      16867

      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

        Activity

        Hide
        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
        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
        Petr Škoda 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
        Petr Škoda 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
        Petr Škoda 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
        Petr Škoda 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
        Sam Hemelryk added a comment -

        Reopening as asked

        Show
        Sam Hemelryk added a comment - Reopening as asked
        Hide
        Petr Škoda added a comment -

        PULL with ugly workaround submitted, thanks!

        Show
        Petr Škoda added a comment - PULL with ugly workaround submitted, thanks!
        Hide
        Helen Foster added a comment -

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

        Show
        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: