Affects Version/s: 7.2.X, 7.3.X
When publishing Content Pages to Live, the FragmentEntryLinks have their plids set to the imported layout plid, and then the Staging -> Live plid mapping is looked up and applied. In the event of a plid collision, this will cause their plids to be set to the wrong value, since the mapping may return a completely unrelated plid since it's looking up the Live plid using a Live plid instead of the Staging plid. This can cause display issues, or even for the FragmentEntryLink to erroneously be deleted from Live is the page that it is incorrectly tied to gets re-published.
Note that this issue is only reproducible on 7.3.x and earlier. It is not reproducible on master because it was fixed with
LPS-149434, which refactored the code in such a way such that the issue no longer occurs. However, this ticket cannot be backported as it is a Technical Task ticket. So we will implement a unique solution for 7.3.x.
Steps to Reproduce
1. Set up two Liferay bundles to run simultaneously: A Staging Bundle and a Live Bundle. Add the following to the portal-ext.properties file of each bundle to make remote staging possible:
2. Start up the Staging Bundle and log in as the admin user.
3. On the default Guest Site, navigate to Site Builder > Pages.
4. Create a new Public Content Page named "Guest Site Test Page", and publish it immediately (the purpose of this step is just to offset the plids from pages that will be created on the Live Bundle later on).
5. Navigate to [Global Menu] > Control Panel > Sites.
6. Create a new Site named "Test Site".
7. On Test Site, navigate to Site Builder > Pages.
8. Create a new Content Page named "Test Page 1", and publish it immediately.
9. On Test Site, navigate to Site Builder > Pages.
10. Create a new Content Page named "Test Page 2". Add a button fragment to "Test Page 2", and then publish it.
11. Start up the Live Bundle and log in as the admin user (I recommend using an incognito window or different browser so that you can switch between the Staging and Live Bundles easily).
12. On the Live Bundle, navigate to [Global Menu] > Control Panel > Sites.
13. Create a new Site named "Test Site".
14. Go back to the Staging Bundle. From the "Test Site" on the Staging Bundle, navigate to Publishing > Staging.
15. Enable Remote Staging and configure it to point to "Test Site" on the Live Bundle.
16. Perform a publish using the default settings.
17. After the publish completes, perform a second publish process. This time, uncheck "Test Page 2" so that you are only publishing "Test Page 1" (You can leave the rest of the settings as the default).
18. After this second publish completes, navigate to "Test Page 2" on the Live Bundle.
Expected Result: The button fragment that you be added would be visible on "Test Page 2" on the Live Bundle.
Actual Result: The button fragment does not appear on "Test Page 2" on the Live Bundle.