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

Cannot get a single hook property when -Dcompany-id-properties=true

    Details

    • Branch Version/s:
      6.2.x
    • Backported to Branch:
      Committed
    • Story Points:
      1
    • Fix Priority:
      2

      Description

      After LPS-64198, hook properties and company properties are read and can be accesed in Control Panel --> Server Administration --> Properties --> Portal Properties. However, if you try to get one of the hook properties, it is not going to be found.

      Steps to reproduce:
      1.- Set up -Dcompany-id-properties=true.
      2.- Add a file called portal-liferay.com.properties to your LIFERAY_HOME, which includes, i.e., a property called test.company.property=companyProperty.
      3.- Start Liferay.
      4.- Deploy a hook which includes a portal.properties file. In this example, we did it with portlet chat.
      5.- Go to Control Panel --> Server Administration --> Script, and execute the code below:

      import com.liferay.portal.util.PropsUtil;
      
      out.println("portal.properties: " + PropsUtil.get("session.shared.attributes"));
      out.println("portal-{company}.properties: " + PropsUtil.get("test.company.property"));
      out.println("portal-{hook}.properties: " + PropsUtil.get("layout.static.portlets.all"));
      
      

      Expected result
      You get portal, company and hook properties.

      Actual result
      You only get portal and company, but not hook property.

      • In this scenario, if you restart the Liferay Portal with -Dcompany-id-properties=false, you'll get portal and hook properties but obviously not the company property.

        Attachments

        1. fixed.png
          fixed.png
          67 kB
        2. properties0610.png
          properties0610.png
          55 kB
        3. properties0610.png
          properties0610.png
          55 kB
        4. properties1.png
          properties1.png
          43 kB

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 11 weeks, 1 day ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.1 CE GA2