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

Orphaned pages that are not linked to the deleted page templates get deleted in the VerifyLayout process even though they are still usable

    Details

      Description

      Description:
      Before LPS-26153 was resolved, it was possible to delete a page template that was referenced by a page. This generally caused the page referencing the deleted template to become unusable, so LPS-43376 added a verify process to delete all orphaned pages. However, under certain conditions, the orphaned page may still be usable, so we don't want to delete it. Specifically, when a page is attached to a deleted page template, but is not set to propagate changes from the page template, it can be edited just like any normal page. This ticket seeks to modify the verify process such that we don't delete orphaned pages for which this is true, but instead we simply delete the reference to the deleted page template so that they are no longer orphaned.

      Steps to reproduce:

      1. Set up a database in a clean bundle of Liferay 6.1.10.
      2. Add a page using the Blog Page Template.
      3. Go to the Details Page for the page you just created and uncheck the box "Automatically apply changes done to the page template Blog." Save your changes.
      4. Delete the Blog Page Template.
      5. Go to the Page that you created on page 2. Try to edit it and notice that you can edit it and use it just like any other page.
      6. Shut down the portal.
      7. Upgrade to the latest version of ee-6.2.x.

      Expected result: The page you created in step 2 would still exist because it was a page that might still be actively used. Its reference to the deleted page template would have been removed during the upgrade process.
      Actual result: The page was deleted during the upgrade process because it was considered to be an orphaned page.

      Reproduced in:
      Clean Bundle of 6.1.10 for steps 1-6: 670acbcd75f08f104aa0272fa4897fd15c9303c7
      ee-6.2.x for step 7: 9ef0db2282f805c9d7712f4b7aabe58476591455

      Note: The VerifyLayout process for deleting orphaned layouts is also in master, but I didn't test it the same way since I've been having trouble with the upgrade process in master recently. Instead, I manually edited Layouts in the database to be linked to non-existent page templates, and then ran the VerifyLayout process. The git commit in which I did this was a9d93439f07137f3304f565cd160e7374ab12cbb

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              michael.bowerman Michael Bowerman (Inactive)
              Participants of an Issue:
              Recent user:
              Zsigmond Rab
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Days since last comment:
                4 years, 41 weeks, 6 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  Master