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



      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 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 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 />

      3. Create a new user: [email protected]

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

      5. Log in as [email protected] 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. [email protected] 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. [email protected] 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.


      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 [email protected] This shouldn't be an issue if you setup an SMTP server beforehand.


          Issue Links



              michael.eguina Michael Eguina (Inactive)
              christopher.kian Christopher Kian
              Participants of an Issue:
              Recent user:
              Yunlin "Steven" Sun
              0 Vote for this issue
              1 Start watching this issue


                Days since last comment:
                2 years, 8 weeks, 2 days ago


                  Version Package
                  7.2.10 DXP FP11
         DXP SP4
                  7.3.3 CE GA4
                  7.3.10 DXP GA1