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

unsupported modification of PAGE->context from 30 to 70 when using the blog menu block

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9.5, 3.0.1
    • Fix Version/s: 2.9.6, 3.0.4
    • Component/s: Blog
    • Testing Instructions:
      Hide
      1. Create an assignment in a course.
      2. Make sure that you have editing set to on.
      3. On the assignment page (mod/assign/view.php) which has the grading summary and submission status, add the blog menu block.
      4. Log in as a student and go to the assignment.
      5. Click on each of the links in the blog menu block.

      Expected result
      None of the links should redirect to a page with a notice about switching contexts.

      Show
      Create an assignment in a course. Make sure that you have editing set to on. On the assignment page (mod/assign/view.php) which has the grading summary and submission status, add the blog menu block. Log in as a student and go to the assignment. Click on each of the links in the blog menu block. Expected result None of the links should redirect to a page with a notice about switching contexts.
    • Affected Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-52642-master
    • Sprint:
      3.1 Sprint 7
    • Issue size:
      Medium

      Description

      Using the blog menu block inside of an activity (such as assignment) will generate a debugging notice when any user tries to create a blog associated with that activity.

      Notice: Coding problem: unsupported modification of PAGE->context from 30 to 70

      line 971 of /lib/pagelib.php: call to debugging()
      line 1016 of /lib/pagelib.php: call to moodle_page->set_context()
      line 683 of /blog/lib.php: call to moodle_page->set_cm()
      line 93 of /blog/edit.php: call to blog_get_headers()

      in /Applications/MAMP/htdocs/moodle29/lib/weblib.php on line 2945

      I'll attach a behat test that will replicate the issue.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/May/16