-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.X, 7.1.X, 7.2.X, Master
-
Fix Version/s: 7.2.10 DXP FP11, 7.2.10.4 DXP SP4, 7.2.X, 7.3.3 CE GA4, 7.3.10 DXP GA1, Master
-
Component/s: Mail
-
Branch Version/s:7.2.x
-
Backported to Branch:Committed
-
Fix Priority:3
-
Sprint:FlexSprint7
-
Git Pull Request:
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: [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.
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 [email protected] This shouldn't be an issue if you setup an SMTP server beforehand.
- causes
-
LPS-113454 Could not initialize class for Subscriptions
- Closed
-
LPS-113451 SharingEntryLocalServiceTest failed with AssertionError
- Closed
- depends on
-
LPS-104987 Bookmark Notification Errors
- Closed
- Testing discovered
-
LPS-113776 When triggering subscription notifications from a virtualhost layoutset, email terms use the default portal hostname
- Closed