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

Duplicate 'This is a copy of a message sent to you...' in message notification emails

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Setup

      1. Log in as an admin.
      2. Create a new user s1.
      3. Visit 'Site administration' > 'Advanced features'.
      4. Turn on the setting 'messagingallusers'.
      5. Save the changes.
      6. Make sure that you can receive emails sent by your Moodle site. Recommended ways to do this:
        1. Configure Mailcatcher/Mailhog; OR
        2. You could add $CFG->divertallemailsto = 'youremail' in your config.php to catch all the emails sent by your Moodle site.
      Test 1: Send the first message to s1. A new conversation will be created.
      1. Log in as an admin.
      2. Search for a user s1 to send a message to.
      3. Send a message to s1.
      4. Go to your inbox and check you have a new mail
        1. EXPECTED RESULT: confirm that you don't have a duplicate end tag line as the error reported and only has at the end of the email this end tag line:

          ....
          ---------------------------------------------------------------------
          This is a copy of a message sent to you at "stable_master". Go to
          http://localhost/m/stable_master/message/index.php?id=IDUSERFROM to reply.
          

      5. Copy the URL which is in the en tag line.
      6. Log in as an s1.
      7. Paste the URL in the browser and press enter.
      8. EXPECTED RESULT: confirm that you can see the conversation between admin and user s1.
      Test 2: Send the second message to s1.  Conversation already exists.
      1. Repeat the same steps that test 1 and the EXPECTED RESULT has to be the same.
      Show
      Setup Log in as an admin. Create a new user s1. Visit 'Site administration' > 'Advanced features'. Turn on the setting 'messagingallusers'. Save the changes. Make sure that you can receive emails sent by your Moodle site. Recommended ways to do this: Configure Mailcatcher/Mailhog; OR You could add $CFG->divertallemailsto = 'youremail' in your config.php to catch all the emails sent by your Moodle site. Test 1: Send the first message to s1. A new conversation will be created. Log in as an admin. Search for a user s1 to send a message to. Send a message to s1 . Go to your inbox and check you have a new mail EXPECTED RESULT:  confirm that you don't have a duplicate end tag line as the error reported and only has at the end of the email this end tag line: .... --------------------------------------------------------------------- This is a copy of a message sent to you at "stable_master". Go to http://localhost/m/stable_master/message/index.php?id=IDUSERFROM to reply. Copy the URL which is in the en tag line. Log in as an s1. Paste the URL in the browser and press enter. EXPECTED RESULT: confirm that you can see the conversation between admin and user s1. Test 2: Send the second message to s1.  Conversation already exists. Repeat the same steps that test 1 and the EXPECTED RESULT has to be the same.
    • Affected Branches:
      MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE
    • Pull 3.6 Branch:
    • Pull Master Branch:
      MDL-64571-master

      Description

      Since upgrading to 3.6.1, message notification emails from Learn Moodle and moodle.org often (though not always) have ' 'This is a copy of a message sent to you...' duplicated as follows:

      ---------------------------------------------------------------------
      This is a copy of a message sent to you at "Learn Moodle". Go to
      https://learn.moodle.net/message/index.php?user=x&id=yz to reply.

      ---------------------------------------------------------------------
      This is a copy of a message sent to you at "Learn Moodle". Go to
      https://learn.moodle.net/message/index.php to reply.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Mar/19

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h