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

Portlet 3.0 incompatibility with PropertiesParamUtil.getProperties(PortletRequest,String)


    Problem Background

    Section 11.1 of the Portlet 3.0 Specification titled "Portlet Parameters" states the following regarding parameter values:

    The value null is a valid parameter value, both within a parameter values array and when set or returned as a single value. Setting a parameter value to null does not remove the parameter. Similarly, an empty array is a valid parameter value.

    The PropertiesParamUtil.getProperties(PortletRequest,String) method assumes Portlet 2.0 functionality, such that null will not be present as a value in the array of values.

    The fix would be for the method to take the Portlet 3.0 requirements into account, so that the method will work the same for portlets that specify version 2.0 or for those that opt-in to version 3.0.

    Steps to Reproduce:

    1. Add Search Bar widget to page
    2. Navigate to the Search Bar Configuration
    3. Click Save

    Expected Result:

    Expected the Destination Page field to remain blank.

    Actual Result:

    The Destination Page field default value is "null". 

    Reproduced on:
    Tomcat 9.0.10 + MySQL 5.7.25
    Portal master-private GIT ID: d813f8afd0c4ff45dcc373c46c80178f9a8c1502


        Issue Links



            • Assignee:
              timothy.pak Timothy Pak
              timothy.pak Timothy Pak
              Participants of an Issue:
              Recent user:
              Clarissa Velazquez
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created:
                Days since last comment:
                1 year, 11 weeks, 6 days ago


                Version Package
                7.1.10 DXP FP10
                7.1.3 CE GA4