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

Cannot add a non-instanciable portlet to a widget page in case it is embedded in a recent webcontent

    Details

      Description

      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

      1. 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>
      1. Create a webcontent using that structure
      2. Create a new widget page "TestPage"
      3. Open the page and click in [+] button: right add bar will be displayed
      4. Go to "Contents" section in the "add bar" => Verify that the previous created webcontent is displayed in recent section.
      5. Go to "Widgets" section and search "Sign in" portlet
      6. 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
      7. 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"

        Attachments

          Activity

            People

            Assignee:
            yang.cao Yang Cao
            Reporter:
            jorge.diaz Jorge Diaz
            Participants of an Issue:
            Recent user:
            Jason Pince
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              30 weeks ago

                Packages

                Version Package
                7.1.10 DXP FP18
                7.1.X
                7.2.10 DXP FP5
                7.2.10.2 DXP SP2
                7.2.X
                7.3.10 DXP GA1
                Master