Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-100082

Multiple email notifications are received for web content folder change



      With the inclusion of LPS-98473, subscriptions are now available for Web Content Articles/Folders/Portlet.  With this change it is possible to send incorrect notifications when moving an article between folders.

      This is due to the way we send subscriptions.

      In a non-staged site, we send notifications at every update of the content.  This includes new entry, updates, moves, trashing, untrashing, and workflow status'.  Each time one of these updates occurs, we send a notification at that time. This makes it very easy for the portal to notify the user of the change.

      However, when we send notification for a staged site, the only notification sent is regarding the article's status.  It has no context as to whether or not a move occurred, how many version updates have already been sent to the user, etc.  The only notification we are sending is that the status has changed (from draft to published), so most all other info is lost.

      I believe the best solution will be to create UserNotificationEvent entries with the "delivered" column set to false during the article's lifecycle.  Then, once a publish occurs, we can check for UserNotificationEvent entries which have not been delivered, send them, and update them.  This will ensure the notifications are correct and shouldn't have too much overhead.

      Steps to reproduce

      1. If testing after LPS-84320 add mail.send.blacklist= to your portal-ext.properties
      2. Bring a master bundle which includes the changes from LPS-98473 online.
      3. Create a new site called "Staging"
      4. Enable Local Live Staging in the "Staging" site
      5. Create a new user who will receive the notifications
      6. Assign the new user to the site
      7. Create a "Basic Role" and assign the following permissions:

      -Web Content: Access in Site Administration
      -Web Content > Web Content: Subscribe
      -Web Content > Web Content: View
      -Web Content > Web Content Folder: Subscribe
      -Site Settings > Site: View Site Administration Menu (This one is automatically added when saving the above permissions)

      These three permissions need to be added for testing in Master
      -Web Content > Web Content Folder: View
      -Web Content > Web Content Folder: Subscribe
      -Web Content > Web Content Article: View

      7. Assign the "Basic Role" to the new user

      As the New User

      8. Log in as the new user in an incognito window
      9. Navigate to the Site -> Content -> Web Content, click on the "i" icon, and then click on the star icon to subscribe

      As the Admin

      10. Create and publish an article

      11. Verify the New User receives an email notification

      11. Update and publish the article 2 times
      12. Confirm that 2 email notifications were received
      13. Move the article into a sub-folder within Web Contents
      14. Publish changes to Live

      Results of Testing

      Expected Result: The New User receives two emails, one stating "User X moved a web content to a folder" and the other "User X moved a web content from a folder"
      Actual Result: The New User receives 3 notifications, one for each update of the article.  The notification has nothing to do with moving the article, and if the admin users moves the article again, the same notifications are displayed.


          Issue Links



              joyce.wang Joyce Wang
              christopher.kian Christopher Kian
              Participants of an Issue:
              Recent user:
              Jason Pince
              0 Vote for this issue
              1 Start watching this issue


                Days since last comment:
                1 year, 41 weeks, 2 days ago


                  Version Package
                  7.2.10 DXP FP8
         DXP SP3
                  7.3.10 DXP GA1