-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.2.X, Master
-
Fix Version/s: 7.1.10 DXP FP18, 7.1.10.5 SP5, 7.1.X, 7.2.10 DXP FP5, 7.2.10.2 DXP SP2, 7.2.X, 7.3.10 DXP GA1, Master
-
Component/s: Product Menu, Web Content > Web Content Administration
-
Branch Version/s:7.2.x, 7.1.x
-
Backported to Branch:Committed
-
Fix Priority:3
-
Git Pull Request:
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
<div><@liferay_portlet["runtime"] portletName="com_liferay_login_web_portlet_LoginPortlet" /></div>
- 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:
- Expected behavior: Portlet is correctly added to the page
- Wrong behavior: 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
- Expected behavior: Portlet is correctly added to the page
- ONLY IN CASE STEP 6 FAILS: Go to "Site Builder" => "Pages" => click in kebab menu of "TestPage" and open "Orphan Widgets" window.
- Expected behavior: com_liferay_login_web_portlet LoginPortlet is not displayed in "Orphan Widgets"
- Wrong behavior: com_liferay_login_web_portlet LoginPortlet is displayed in "Orphan Widgets"
- Expected behavior: com_liferay_login_web_portlet LoginPortlet is not displayed in "Orphan Widgets"