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

Virtual Host of Private Page isn't sent through subscribed emails when a Public page(s) exists

    Details

      Description

      When a Site has a public page, the Virtual host of a Private Page isn't sent through a subscriber email. It's easier to understand the issue once you go through the steps to reproduce.

      Steps to Reproduce
      Setup: Setup an SMTP server so you can see emails. I suggest using http://nilhcem.com/FakeSMTP/ as it is a standalone .jar file that listens for SMTP.
      Make sure the SMTP port FakeSMTP is using matches the one Liferay is using at Control Panel -> Server Administration -> Mail -> Outgoing SMTP Server

      1. Create two sites
      1.1. Site 1 (Only private pages)
      1.1.1. Set Site URL -> Private Pages to: vh-site1
      1.1.2. Add a new private page: Private 1
      1.1.2.1. Add the blogs portlet to this page

      1.2. Site 2 (Public and private pages)
      1.2.1. Set Site URL -> Private Pages to: vh-site2
      1.2.2. Add a new private page: Private 1
      1.2.2.1. Add the blogs portlet to this page
      1.2.3. Add a new public page: Public 1

      2. Configure System Settings
      2.1. On Comments setting update "Email Discussion Comment Added Body" to the following:

      Dear [$TO_NAME$],<br /><br />
      
      [$COMMENTS_USER_NAME$] added a new comment.<br /><br />
      
      ----------<br />
      [$COMMENTS_BODY$]<br />
      ----------<br /><br />
      
      <a href="[$PORTAL_URL$]">Liferay DXP</a><br /><br />
      
      Sincerely,<br />
      [$FROM_NAME$]<br />
      [$FROM_ADDRESS$]
      

      3. Create a new user: a@liferay.com

      4. Create a new entry on Site 1/Private 1/Blogs portlet

      5. Log in as a@liferay.com and subscribe to the entry you created on step 4

      6. Log in as test/test (default Admin), and add a comment to the entry you created on step 4

      7. a@liferay.com will receive a email with the following link. This is correct and the expected behavior
      <a href="http://vh-site1:8080" target="_other" rel="nofollow">Liferay DXP</a>

      8. Repeat the steps 4, 5, and 6 using Site 2

      9. a@liferay.com will receive a email with the link:
      9.1. Actual link received
      <a href="http://localhost:8080" target="_other" rel="nofollow">Liferay DXP</a>

      Expected link
      <a href="http://vh-site2:8080" target="_other" rel="nofollow">Liferay DXP</a>

      If you delete the Public page in Site 2, the issue no longer reproduces and the link that is sent is the Expected link.

      Errors
      None

      Testing
      Reproduced in 72x-20200506
      Reproduced in master-20200506. Note that in Master, Require strangers to verify their email address? is enabled by default, so you will need a verification code sent through email to login as a@liferay.com. This shouldn't be an issue if you setup an SMTP server beforehand.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michael.eguina Michael Eguina
              Reporter:
              christopher.kian Christopher Kian
              Participants of an Issue:
              Recent user:
              Jason Pince
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                23 weeks, 4 days ago

                  Packages

                  Version Package
                  7.3.3 CE GA4
                  7.3.10 DXP GA1
                  Master