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

Trying to view a forum without the capability may lead you to a broken page.

    XMLWordPrintable

Details

    • MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE
    • MOODLE_32_STABLE, MOODLE_33_STABLE
    • MDL-57246-33-forumredirect
    • Easy
    • Hide

      Reproduce:

      1) View a forum ( mod/forum/view.php?id=xxx ) with a user that does not have the correct capability ( mod/forum:viewdiscussion )

      2) See the message 'You do not have the permission to view discussions in this forum'.

      3) Click the 'Continue' button.

      4) Error: Invalid parameter

      Show
      Reproduce: 1) View a forum ( mod/forum/view.php?id=xxx ) with a user that does not have the correct capability ( mod/forum:viewdiscussion ) 2) See the message 'You do not have the permission to view discussions in this forum'. 3) Click the 'Continue' button. 4) Error: Invalid parameter

    Description

      Reproduce:

      1) View a forum ( mod/forum/view.php?id=xxx ) with a user that does not have the correct capability ( mod/forum:viewdiscussion )

      2) See the message 'You do not have the permission to view discussions in this forum'.

      3) Click the 'Continue' button.

      4) Error: Invalid parameter

      Cause:

      The button on step 3 does not have a valid link, so it redirects to the same page without the query string '?id=xxx'. The error comes from the missing query string.

      Suggested solution:

      Redirect to $CFG->wwwroot.'/index.php' as usual.

      Attachments

        Issue Links

          Activity

            People

              roperto Daniel Thee Roperto
              roperto Daniel Thee Roperto
              Ankit Agarwal Ankit Agarwal
              Andrew Lyons Andrew Lyons
              Adrian Greeve Adrian Greeve
              Adrian Greeve, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/Sep/17