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

Cannot delete display page if duplicated from activating local staging

    Details

      Description

      Description
      When publishing a Display Page Template to Live, or activating staging, the DDMStructureLink is not copied as well, so we have 2 Display Page Templates (1 in local, 1 in live site) that point to a DDMStructureLink.

      However, since the DDMStructureLink only points back to one of them, calls to getUniqueDDMStructureLink to find the DDMStructureLink of a LayoutPageTemplateEntry when needed to find DDMStructure (or to remove link itself like when using deletion), there are times when we fail to find the DDMStructureLink.

      If we Activate staging, causing the display page templates to publish to live, the one on the staging site will have a missing DDMStructureLink. If we publish to live normally, the display page template will have a missing DDMStructureLink on the live site. Since users cannot normally access the live site display page templates, without using API calls, encountering this bug can be a bit more rare, although these missing database objects can cause problems in the future.

      My recommendation would be to support exporting DDMStructureLinks when exporting a layoutPageTemplateEntry, since we support staging for all layoutPageTemplateEntries currently (see LayoutPageTemplateEntryStagedModelDataHandler)

      Steps to Reproduce

      1. Create a Display Page with Mapping set to an Object / Structure (ClassNameId / ClassTypeId)
      2. Publish
      3. Activate Local Staging
      4. Try to delete display page in local staging

      Expected Result
      Display Page deletable

      Actual Result
      Display page not deletable without any helpful errors

      Tested on Tomcat 9.0.10 + MySQL 5.7
      Portal master GIT ID: 9bbc1feff22ff47bb79aaff90920f5f0e09f291e

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lu.liu Lu Liu
                Reporter:
                kyle.miho Kyle Miho
                Participants of an Issue:
                Recent user:
                Jason Pince
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  16 weeks, 3 days ago

                  Packages

                  Version Package
                  7.2.10 DXP FP1
                  7.2.X
                  7.2.1 CE GA2
                  Master