When Staging-Remote is enabled and you publish a child page which parent are not already published an error is retrieved (The page could not be found) and the page is not published.
Steps to reproduce:
1. Start both servers.
2. Create the Origin Site (OS) and Destination Site (DS) in the respective servers.
3. In OS: Enable Staging Remote in site configuration with the parameters of DS (URL, port, siteId)
4. In OS: Create three pages: home page (PH), page 1 (P1), and a page 2 (P2) as child of P1.
5. In OS: Go to PH, click in publish to remote site, change selection and only select PH
- Result Ok. The page is published to DS.
6. In OS: Go to P2, click in publish to remote site, change selection and only select P2, make sure that publish ancestor if necessary is checked.
- Result Error. The page could not be found, and the page is not published to DS.
The method that retrieves the not-published parents com.liferay.portal.staging.StagingImpl.getMissingParentLayouts(Layout, long) doesn't work properly with Remote Staging.