Affects Version/s: 7.2.X, Master
Cannot add a non-instanciable portlet to a widget page in case it is embedded in a recent webcontent.
Root cause of the issue
When you open the right bar in order to add a portlet, recent contents are also displayed.
When a recent content is previewed, we are calling to assetRenderer.getSummary method, that method internally renders the webcontent with their embedded portlets.
The problem is embedded portlet are rendered in current page, so non-instanciable portlets cannot be added as they were already added during webcontent preview.
Steps to reproduce
- Create a webcontent structure with following template, that has a embedded "Sign in" portlet
- Create a webcontent using that structure
- Create a new widget page "TestPage"
- Open the page and click in [+] button: right add bar will be displayed
- Go to "Contents" section in the "add bar" => Verify that the previous created webcontent is displayed in recent section.
- Go to "Widgets" section and search "Sign in" portlet
- Add "Sign in" portlet to the page:
- : Portlet is correctly added to the page
- : Portlet is not added to the page and following trace is displayed in log file: Portlet com_liferay_login_web_portlet_LoginPortlet cannot be added to layout 35 by user 20131
- ONLY IN CASE STEP 6 FAILS: Go to "Site Builder" => "Pages" => click in kebab menu of "TestPage" and open "Orphan Widgets" window.
- : com_liferay_login_web_portlet LoginPortlet is not displayed in "Orphan Widgets"
- : com_liferay_login_web_portlet LoginPortlet is displayed in "Orphan Widgets"