Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-74114 Make Liferay compatible with version 2.0 tests in the Portlet 3.0 TCK
  3. LPS-77116

Portlet 3.0 TCK: The PortletRequest.isPortletModeAllowed method must return FALSE for a custom portlet mode with <portal-managed>true</portal-managed> that is not supported by the portlet container.

    Details

      Description

      Test Failures:

      2 test cases fail with the following message:

      • V2AddlPortletTests_SPEC2_8_PortletModes_declaringPortletModes5: The PortletRequest.isPortletModeAllowed method must return FALSE for a custom portlet mode with <portal-managed>true</portal-managed> that is not supported by the portlet container. Failed because CUSTOM2 portlet mode is allowed.
      • V2AddlPortletTests_SPEC2_8_PortletModes_declaringPortletModes6: The portlet container must ignore all custom portlet modes in the deployment descriptor with <portal-managed>true</portal-managed> that is not supported by the portlet container. Failed because CUSTOM2 portlet mode is allowed.

      Background:

      Portlet 3.0 Spec Chapter 9.4:

      Portal vendors may define custom portlet modes for vendor-specific functionality for modes that need to be managed by the portal. Portlets may define additional custom portlet modes that don’t need to be managed by the portal and correspond to the VIEW mode from a portal point of view.
      The portlet must declare custom portlet modes that are not managed by the portal in the portlet configuration. Portlet modes are considered portal managed by default.

      Portlets must define the custom portlet modes they intend to use in the portlet configuration, see Section 28.1.2 Custom Portlet Mode on page 185. At deployment time, the portal managed custom portlet modes defined by the portlet should be mapped to custom portlet modes supported by the portal implementation.

      ...

      If a custom portlet mode defined in the portlet configuration is not mapped to a custom portlet mode provided by the portal or otherwise supported as non-managed portlet mode, the portlet must not be invoked in that portlet mode.

      JavaDoc of PortletRequest.isPortletModeAllowed():

      Returns true, if the given portlet mode is a valid one to set for this portlet in the context of the current request.

      Liferay doesn't handle the <portal-managed> for custom portlet modes, so that isPortletModeAllowed returns wrong value for a "invalid" portlet mode.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brian.chan Brian Chan
                Reporter:
                dante.wang Dante Wang
                Recent user:
                Csaba Turcsan
                Participants of an Issue:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 35 weeks, 3 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP37
                  7.0.0 DXP SP7
                  7.0.5 CE GA6
                  7.0.X
                  Master