Type: Feature Request
Affects Version/s: None
Fix Version/s: None
Component/s: Core Infrastructure
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.