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

MNet landing page does not set context

XMLWordPrintable

    • MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE
    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • MDL-52975-master-mnet-context
    • Hide

      Variant 1: Skip testing and just admit the patch makes sense and can't hurt. Really, preparing the environment to reproduce this is much more complex task than the actual benefit. I did it so I know

      Variant 2: To test this, you need two MNet'ed sites.

      • Let us say the site A acts as the identity provider (having users defined), the site B acts as the service provider. Users roam from A to B.
      • Additionally, you need custom profile field defined on the site B that is set as required. So that users roaming from A to B are asked to complete their profile.
      • Finally, debugging must be enabled on the site B so the warning is display.
      1. Set up an MNet environment on the sites A and B.
      2. Define a require custom profile field on the site B.
      3. Add a working Network servers block to the site A and allow the users to roam to B.
      4. Log in as a user at the site A and roam to B.
      5. Make sure there is no warning displayed.

      Note: Users are not allowed to modify their profiles on the site B, do not expect they would be asked to complete missing custom form fields.

      Show
      Variant 1: Skip testing and just admit the patch makes sense and can't hurt. Really, preparing the environment to reproduce this is much more complex task than the actual benefit. I did it so I know Variant 2: To test this, you need two MNet'ed sites. Let us say the site A acts as the identity provider (having users defined), the site B acts as the service provider. Users roam from A to B. Additionally, you need custom profile field defined on the site B that is set as required. So that users roaming from A to B are asked to complete their profile. Finally, debugging must be enabled on the site B so the warning is display. Set up an MNet environment on the sites A and B. Define a require custom profile field on the site B. Add a working Network servers block to the site A and allow the users to roam to B. Log in as a user at the site A and roam to B. Make sure there is no warning displayed. Note: Users are not allowed to modify their profiles on the site B, do not expect they would be asked to complete missing custom form fields.

      We have a moodle installation using Mnet. Whenwe jump to another Mnet Peer we have the following error on auth/ment/land.php file beacause the context is not set.

      Coding problem: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context(). The page may not display correctly as a result

      line 453 of /lib/pagelib.php: call to debugging()
      line 768 of /lib/pagelib.php: call to moodle_page->magic_get_context()
      line 1381 of /lib/weblib.php: call to moodle_page->__get()
      line 62 of /user/profile/field/menu/field.class.php: call to format_string()
      line 565 of /user/profile/lib.php: call to profile_field_menu->profile_field_menu()
      line 621 of /user/profile/lib.php: call to profile_user_record()
      line 4581 of /lib/moodlelib.php: call to profile_load_custom_fields()
      line 54 of /auth/mnet/land.php: call to get_complete_user_data()

            mudrd8mz David Mudrák (@mudrd8mz)
            leperf LE PERF Stéphane
            Andrew Lyons Andrew Lyons
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Adrian Greeve Adrian Greeve
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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