-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.2.X, Master
-
Fix Version/s: 7.2.10 DXP FP5, 7.2.10.2 DXP SP2, 7.2.X, 7.3.1 CE GA2, 7.3.2 CE GA3, 7.3.10 DXP GA1, Master
-
Component/s: Pages > Page Administration
-
Branch Version/s:7.2.x
-
Backported to Branch:Committed
-
Fix Priority:3
-
Git Pull Request:
In case LayoutTypePortletImpl.addPortletId cannot add a portlet to a page, it returns null.
The problem is it is difficult to diagnose the root cause why it didn't added the portlet, because it has 6 return null; instructions:
Steps to reproduce
- Activate INFO trace for category: com.liferay.portal.model.impl
- Create a new page
- Open the same page in two browser windows
- Go first browser window:
- Click in [+] button => widgets => type "sign in"
- "sign in" widget will be shown in Add bar.
DO NOT ADD TO THE PAGE YET
- Go second browser window:
- Click in [+] button => widgets => type "sign in"
- "sign in" widget will be shown in Add bar.
- Add it to page
- Return to first browser window:
- Add "sign in" widget from "Add bar" to the page
- An error will be displayed, this error is ok because portlet already exists in the page
- Check log file:
- Expected behavior: Following INFO trace is written to log file
2020-03-04 16:24:51.901 INFO [default task-46][LayoutTypePortletImpl:1374] Portlet com_liferay_login_web_portlet_LoginPortlet cannot be added to layout 21 because it already has other portlet with same id
- Wrong behavior: No INFO trace is written to log file
- Expected behavior: Following INFO trace is written to log file
There are other ERROR / exception traces that are related to
LPS-109833, for now, you can ignore them
- Testing discovered
-
LPS-109833 NPE is written to log file in case a portlet couldn't be added to a page
- Closed