Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-109788

LayoutTypePortletImpl.addPortletId should have more info traces to be able to diagnose why a portlet cannot be added to a page



      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

      1. Activate INFO trace for category: com.liferay.portal.model.impl
      2. Create a new page
      3. Open the same page in two browser windows
      4. 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
      5. Go second browser window:
        • Click in [+] button => widgets => type "sign in"
        • "sign in" widget will be shown in Add bar.
        • Add it to page
      6. Return to first browser window:
        • Add "sign in" widget from "Add bar" to the page
      7. An error will be displayed, this error is ok because portlet already exists in the page
      8. 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
      9. There are other ERROR / exception traces that are related to LPS-109833, for now, you can ignore them


        Issue Links



              yang.cao Yang Cao
              jorge.diaz Jorge Diaz
              Kiyoshi Lee Kiyoshi Lee
              0 Vote for this issue
              1 Start watching this issue


                3 years, 12 weeks, 2 days ago


                  Version Package
                  7.2.10 DXP FP5
         DXP SP2
                  7.3.1 CE GA2
                  7.3.2 CE GA3
                  7.3.10 DXP GA1