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

Messaging: Exception - Cannot access self:: when no class scope is active + last message is displayed twice

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.6
    • 3.6
    • Messages
    • MOODLE_36_STABLE
    • MOODLE_36_STABLE
    • MDL-63901-master
    • Hide

      Setup

      1. Login as admin
      2. Allow site-wide messaging ($CFG->messagingallusers=true or via Site Admin -> Advanced features)
      3. Add the Online users block to the dashboard
      4. Create 3 users (s1, s2, s3)

      Testing scenario 1: Conversations are created (instead of throwing an exception)

      1. Access to the new user profile for s3
      2. Click over login as
      3. View the dashboard
      4. In the Online Users block, click the icon to send a message to the admin user
        • Verify you get to the messaging page to send the admin user a message
        • Verify you do not get the PHP error listed in the description of this issue
        • Verify you can send a couple of messages to the admin

       

      Testing scenario 2: Messages are displayed properly and the last message is not shown twice when it's sent by the other user

      1. Login as admin
      2. View the dashboard
      3. Load up the message/index page (YOURSITE/message/index.php) and click the user conversation you've created in the testing scenario 1 with s3
        • Verify the messages sent by the new user are displayed properly
      4. Reload the page using the browser controls but don't click anything.
        • Verify the layout of the loaded page is exactly the same as before
      5. Wait for a minute without doing anything
        • Verify the last message sent by the new user is not displayed twice
      6. Click over the user conversation
        • Verify the layout of the loaded page is exactly the same as before

       

      Testing scenario 3: The last message is not shown twice when it's sent by the current user

      1. Login as s2
      2. Logout and login as s1
      3. In the Online Users block, click the icon to send a couple of messages to the s2 user
      4. Login as s2
      5. Load up the message/index page (YOURSITE/message/index.php) and click the user conversation with s1
        • Verify the messages sent by the s1 user are displayed properly
      6. Send a message to s1
      7. Reload the page using the browser controls but don't click anything.
        • Verify the layout of the loaded page is exactly the same as before
      8. Wait for a minute without doing anything
        • Verify the message sent by s2 is not displayed twice
      Show
      Setup Login as admin Allow site-wide messaging ($CFG->messagingallusers=true or via Site Admin -> Advanced features) Add the Online users block to the dashboard Create 3 users (s1, s2, s3) Testing scenario 1: Conversations are created (instead of throwing an exception) Access to the new user profile for s3 Click over  login as View the dashboard In the Online Users block, click the icon to send a message to the admin user Verify you get to the messaging page to send the admin user a message Verify you do not get the PHP error listed in the description of this issue Verify you can send a couple of messages to the admin   Testing scenario 2: Messages are displayed properly and the last message is not shown twice when it's sent by the other user Login as admin View the dashboard Load up the message/index page (YOURSITE/message/index.php) and click the user conversation you've created in the testing scenario 1 with s3 Verify  the messages sent by the new user are displayed properly Reload the page using the browser controls but don't click anything. Verify the layout of the loaded page is exactly the same as before Wait for a minute without doing anything Verify the last message sent by the new user is not displayed twice Click over the user conversation Verify the layout of the loaded page is exactly the same as before   Testing scenario 3: The last message is not shown twice when it's sent by the current user Login as s2 Logout and login as s1 In the Online Users block, click the icon to send a couple of messages to the s2 user Login as s2 Load up the message/index page (YOURSITE/message/index.php) and click the user conversation with s1 Verify  the messages sent by the s1 user are displayed properly Send a message to s1 Reload the page using the browser controls but don't click anything. Verify the layout of the loaded page is exactly the same as before Wait for a minute without doing anything Verify the message sent by s2 is not displayed twice

      When accessing the message page with the id parameter set to another userid, it generates a php error:

      Exception - Cannot access self:: when no class scope is active
      Debug info: 
      Error code: generalexceptionmessage
      ×Stack trace: * line 143 of /message/index.php: Error thrown
      Continue
       

            sarjona Sara Arjona (@sarjona)
            damyon Damyon Wiese
            Carlos Escobedo Carlos Escobedo
            Damyon Wiese Damyon Wiese
            Damyon Wiese Damyon Wiese
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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