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

layoutBranchId is saved twice in Portal Preferences

Details

    Description

      As BPR-4844 's outcome, StagingImpl is using 2 different ways to save layoutBranchId to the DB.

      For example:
      https://github.com/liferay/liferay-portal-ee/blob/cb54329061a5048a63c5c5c87cf2d7f93dfe51a7/portal-impl/src/com/liferay/portal/staging/StagingImpl.java#L1834

      https://github.com/liferay/liferay-portal-ee/blob/cb54329061a5048a63c5c5c87cf2d7f93dfe51a7/portal-impl/src/com/liferay/portal/staging/StagingImpl.java#L1838

       

      Steps:

      Start a vanilla 6.2 with fresh DB.

      Create a new site with 30 pages.

      Start Staging on the site with page versioning enabled.

      Select 6 pages and publish a new version of them.

      Select 2 of those pages and publish a yet again.

      Checkpoint: In the DB, portalpreferences table will have multiple xml name-value pairs belonging to com.liferay.portal.kernel.staging.Staging for the current user.

      Examples:

      com.liferay.portal.kernel.staging.Staging#layoutBranchId-#-#

      com.liferay.portal.kernel.staging.Staging#layoutSetBranchId_#

       

      Stop the Portal and Patch it with sp20.

      Run the PortalPreferences's verify process

      Verify that the DB only has one staging related xml entry with name: com.liferay.portal.kernel.staging.Staging#stagingRecentLayoutIdsMap, value is not empty.

       

      Start the Portal

      Publish 2 random pages.

      Check the portalpreferences table.

       

      Expected: Portal Preferences only has the JSON object.

      Actual: Portal Preferences has both normal xml entries and the JSON object.

      Attachments

        Issue Links

          Activity

            People

              summer.zhang Summer Zhang
              balazs.safrany-kovalik Balázs Sáfrány-Kovalik
              Marta Elicegui Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                5 years, 26 weeks, 3 days ago

                Packages

                  Version Package
                  6.2.X EE