Type: Technical Task
Affects Version/s: None
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.
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.