Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-150132

Staged NavigationMenu in a Public Page doesn't show items for Private Pages

    Details

      Description

      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.

       

      Reproduction steps:

      • 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

      Checkpoint 1: In the "Content" section, you can see that 1 Navigation Menu and 2 Navigation Menu Items will be publish:

      Navigation Menus (1), Navigation Menu Items (2)
      
      • Click "Publish to Live"

      Checkpoint 2: 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"

       Expected result:

      The Navigation Menu shows both Home and Private1 pages in Live.

       Actual result:

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marcell.weller Marcell Weller
              Reporter:
              jose.bango Jose L. Bango
              Participants of an Issue:
              Recent user:
              Tomáš Polešovský
              Engineering Assignee:
              Jose L. Bango
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                7 weeks, 5 days ago

                  Packages

                  Version Package
                  7.2.X
                  7.3.X
                  7.4.3.20 CE GA20
                  Master