Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.2.X, Master
-
7.2.x
-
Committed
-
3
Description
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
Attachments
Issue Links
- Testing discovered
-
LPS-109833 NPE is written to log file in case a portlet couldn't be added to a page
- Closed