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

Site admin content.jsp throws a NPE when there are no scopeable portlets to display in a scope

    Details

      Description

      Description:
      When there is a scope select for content, if the single portlet available to the user in the content section of the site scope is not scopeable, that portlet (panel app) is not shown and a NPE is thrown. When another portlet is also available to the user, both portlets are shown.

      I cannot reproduce this behavior in master because Asset Tags now have their own separate Categorization and deploying the test module from LPP-31278 onto master results in a missing dependency. However, examining the code, that because master's code is identical the same errors are possible and need to be addressed.

      Steps to reproduce:

      1. Add a web content display portlet to a page
      2. Add a scope using that portlet (Configuration > Scope > Scope Dropdown: Welcome (Create New) > Save)
      3. On the Product Menu, click Liferay DXP (site) > Content, and assert that Default Scope is displayed.
      4. Go into Users > Roles > Regular Roles > User > Click the tricolon/options button > Define Permissions
      5. In Define Permissions for User, in the tree go to Site Administration > Content > Web Content > select Access and View
      6. In Define Permissions for User, in the tree go to Site Administration > Categorization > Tags > select Access and View
      7. Create new User
      8. Log in with the user to confirm whether the Web Content and test portlet panels show under site > Content > "Default Scope"
      9. Log in as admin and remove User permissions granted in #7 for web content.
      10. Repeat step 10 and see that neither portlet is shown on the navigation menu

      Expected Behavior:
      The navigation menu would not show empty scopes

      Actual Behavior:
      When the user is granted view/access permission to only the test portlet, it does not show in the menu and a NullPointerException is thrown.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                50 weeks, 1 day ago

                Packages

                Version Package
                7.0.0 DXP FP59
                7.0.0 DXP SP9
                7.0.X
                7.1.10 DXP FP3
                7.1.1 CE GA2
                7.1.10.1 SP1
                7.1.X
                Master