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

Invalid response when replying privately to discussion with readprivatereplies off

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • 3.7.2, 3.8
    • Forum
    • None
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • MDL-67109-master_invalidresponse
    • Hide

      Before Patch:

      1. Use the developer tools to create a XS size course.
      2. Edit the permissions of the Student role to have 'mod/forum:readprivatereplies' on 'Prevent' and 'mod/forum:postprivatereply' on 'Allow'.
      3. Enter the course, use the 'Log in as' feature on the enrolled student.
      4. Navigate back to the course, enter the forum module
      5. Click reply, add some text, check 'Reply privately' and click the 'Post to forum' button.
      6. An error box with 'invalidresponse' as the title should popup and when closing that box it won't appear as if the reply was posted

      After Patch:

      1. Use the developer tools to create a XS size course.
      2. Edit the permissions of the Student role to have 'mod/forum:readprivatereplies' on 'Prevent' and 'mod/forum:postprivatereply' on 'Allow'.
      3. Enter the course, use the 'Log in as' feature on the enrolled student.
      4. Navigate back to the course, enter the forum module
      5. Click reply, add some text, check 'Reply privately' and click the 'Post to forum' button.
      6. The reply will be posted and no error given.
      Show
      Before Patch: Use the developer tools to create a XS size course. Edit the permissions of the Student role to have 'mod/forum:readprivatereplies' on 'Prevent' and 'mod/forum:postprivatereply' on 'Allow'. Enter the course, use the 'Log in as' feature on the enrolled student. Navigate back to the course, enter the forum module Click reply, add some text, check 'Reply privately' and click the 'Post to forum' button. An error box with 'invalidresponse' as the title should popup and when closing that box it won't appear as if the reply was posted After Patch: Use the developer tools to create a XS size course. Edit the permissions of the Student role to have 'mod/forum:readprivatereplies' on 'Prevent' and 'mod/forum:postprivatereply' on 'Allow'. Enter the course, use the 'Log in as' feature on the enrolled student. Navigate back to the course, enter the forum module Click reply, add some text, check 'Reply privately' and click the 'Post to forum' button. The reply will be posted and no error given.

      When replying privately to a forum discussion from an account with mod/forum:readprivatereplies off a invalid response value detected error popup appears.

      It has the title invalidresponse and the body says an invalid response value detected, file /lib/externallib.php on line 442 with some more information in the stack trace

      From my testing this only occurs when replying to another user(not yourself), privately, and with mod/forum:readprivatereplies off.

       Testing Instructions:

      1. Go to site administration and disable mod/forum:readprivatereplies for the account you are going to reply to the discussion with. mod/forum:postprivatereply must be enabled
      2. Login to an account with access to a forum.
      3. Navigate to a forum discussion posted by another user
      4. Reply privately to another user
      5. A popup of the error will appear, the post will be posted but for you it will have looked like it wasn't.

      If you turn your debug setting to none it will still show.
      I have attached an image of the pop up dialog

            alexmorris Alexander Morris
            alexmorris Alexander Morris
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 9 minutes
                9m

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