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

Use PortletLayoutListener.onRemoveFromLayout to remove Portlets when a Page is deleted

    Details

    • Liferay Contributor's Agreement:
      Accept

      Description

      Issue: The PortletLayoutListener.onRemoveFromLayout method is not triggered when the Page a Portlet is placed on is removed. This ticket requests that PortletLayoutListener.onRemoveFromLayout is triggered in this event. This would miirror how the method is triggered when an individual portlet is removed from the page. The implementation of this feature would be helpful since it would clean up the Portlet data whenever a Page is deleted.

      Steps to Reproduce:
      1. Turn up logging to debug on Web Content Display by going to Server Administration -> Log Levels -> Update Category -> com.liferay.portlet.journalcontent.JournalContentPortletLayoutListener=DEBUG.
      2. Add a page and add a Web Content Display to the page. A message like this should appear in the server logs "[JournalContentPortletLayoutListener:60] Add 56_INSTANCE_2iK0aSG6y3XM to layout 920362"
      3. Remove the portlet from the page. This message should appear: "[JournalContentPortletLayoutListener:99] Remove 56_INSTANCE_IHK2hckTyUPC from layout 920362"
      4. Add a Web Content Display to the page again.
      5. Delete the page.

      Result: The method is not called.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                support-lep@liferay.com SE Support
                Reporter:
                kevin.ofarrell Kevin Ofarrell (Inactive)
              • Votes:
                2 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Packages

                  Version Package