Affects Version/s: 7.2.X, 7.3.X, Master
The result of mixing public and private pages in navigation menus is not consistent. If you enable page versioning, the result is even less consistent.
This issue is related to
LPS-125086. A private page cannot be checked if it is a public page staging process and vice-versa.
- In a vanilla default site, enable Local Staging
- Site Builder > Pages: Create a private page "Private1"
- Site Builder > Navigation Menus: Create a Navigation Menu "NavMenu"
- Add "Home" (public page) and "Private1" (private page) to "NavMenu"
- Go to Home page and change the default Menu Display to use NavMenu:
- 3 dots menu > Configuration > Choose Menu > Select > NavMenu
- Go to Publishing > Staging > '+' to create a new staging process for public pages
- Make sure that "Home" page is checked
: In the "Content" section, you can see that 1 Navigation Menu and 2 Navigation Menu Items will be publish:
- Click "Publish to Live"
: As it was a publication for public pages, only the Navigation Menu Item pointing to a public page is shown in Live. "Private1" is not available in Live yet.
- Go to Publishing > Staging > '+' to create a new staging process for private pages
- Click "Change to Private Pages" and verify that "Private1" is checked
- Click "Publish to Live"
The Navigation Menu shows both Home and Private1 pages in Live.
The Navigation Menu keeps showing only Home page in Live. If you want the Private1 Navigation Menu Item to be shown in Live, you have to manually remove the page from the Navigation Menu, add it again and perform a publication again.
Note: due to this check implemented in
LPS-125086, the above behaviour is not always reproducible. It only occurs when the private page "layoutId" is the same of one of the checked public pages in the publication. Because a private page and a public page can share the same "layoutId".
That behaviour is not consistent, it is random. A private page can never be checked in a publication of public pages (and vice versa), so an extra condition should be added.
In addition to that, if Page Versioning is enabled, some undesired records are created in the database at "Checkpoint 2". In the staging site database, you can see how a new row is added to "LayoutBranch" table (Page Variations) for the private page, but pointing to the public "LayoutSetBranch" (Site Pages Variation). And a new public "LayoutRevision" for that private page is added too.
That undesired layout revision is in INACTIVE status so the method will return false here and the menu item is removed from the publication by this commit (
LPS-125086). That's why the above steps cannot be reproduced in master if Page Versioning is enabled.
However, as the aforementioned commit is not available in 7.2 nor 7.3 (
LPS-125086 is not reproducible in those branches), the described issue occurs always in those branches.