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

Accessing control panel URL on Weblogic throws IllegalStateException

    Details

      Description

      Description
      Accessing control panel URL on Weblogic throws IllegalStateException

      Steps to reproduce/Testing done
      Initial setup:

      1. Deploy Liferay onto Weblogic (no other plugins are needed)
      2. Set the following in portal-ext.properties to disable user personal pages
        layout.user.private.layouts.auto.create=false
        layout.user.private.layouts.enabled=false
        layout.user.private.layouts.modifiable=false
        layout.user.public.layouts.auto.create=false
        layout.user.public.layouts.enabled=false
        layout.user.public.layouts.modifiable=false

      Role setup:

      1. Login as a portal administrator
      2. Navigate to Define Permissions for the User role
      3. Select Control Panel > General Permissions
      4. Under "General Permissions", give the "Go to Control Panel" permission
      5. Save changes
      6. Select Control Panel > Sites > Site
      7. Under "General Permissions", give the "Access in Control Panel" permission
      8. Save changes

      User setup:

      1. Create a user 'reviewer'

      Steps to reproduce:

      1. Sign in as the 'reviewer' user
      2. Navigate to the control panel

      Results:
      Expectation is that there are no errors. Actual behavior is that Liferay throws an exception.

      The issue is that we're sending a redirect inside of a JSP, so it will continue processing the remaining HTML (in particular, the RuntimeTag just below it).

      <%
      Map<String, List<Portlet>> categoriesMap = PortalUtil.getControlPanelCategoriesMap(request);
      
      if (categoriesMap.size() == 1) {
          for (String curCategory : categoriesMap.keySet()) {
              List<Portlet> categoryPortlets = categoriesMap.get(curCategory);
              if (categoryPortlets.size() == 1) {
                  Portlet firstPortlet = categoryPortlets.get(0);
      
                  PortletURL redirectURL = PortalUtil.getSiteAdministrationURL(request, themeDisplay, firstPortlet.getPortletId());
      
                  response.sendRedirect(redirectURL.toString());
              }
           }
      }
      
      request.setAttribute(WebKeys.CONTROL_PANEL_CATEGORIES_MAP, categoriesMap);
      %>
      

      Move logic to ServicePreAction, similar to work done in LPS-37846.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mark.jin Mark Jin (Inactive)
              Reporter:
              george.chi George Chi (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                8 years, 1 week, 3 days ago

                  Packages

                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M1