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

Portal instance properties when empty discard settings from previously loaded files

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Inactive
    • Affects Version/s: 6.1.1 CE GA2
    • Fix Version/s: None
    • Labels:
    • Environment:
      Liferay 6.1.1 CE GA2 bundled with Tomcat 7.0.27, CentOS 2.6.32-358.6.2.el6.x86_64

      Description

      When user sets more Liferay portal instances, sets property file per instance, then in situation when certain properties are set in first property file (e.g. portal-site1.properties) and another instance property file (e.g. portal-site2.properties) or portal-ext.properties file is loaded afterwards and does not have same properties set, then settings such as for document library set in first property file are not taken into account.

      Steps to reproduce:
      1) Set up clean Liferay Portal with default file repository
      2) Add another portal instance via Control Panel / Portal Instances.
      3) Create empty instance properties file and set loading these files via http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/properties-override .
      4) Add to portal-ext.properties valid login credentials for Amazon S3:
      dl.store.s3.access.key=
      dl.store.s3.secret.key=
      dl.store.impl=com.liferay.portlet.documentlibrary.store.S3Store
      5) Add to the instance properties file, which is loaded first (in our test case to portal-site1.properties, log is shown below), valid bucket name setting:
      dl.store.s3.bucket.name=
      6) Restart Liferay Portal
      7) Upload document to both instances and and check (via Amazon S3 management console) that files are loaded to Amazon S3 storage. Upload fails to any of the instance with incorrect settings, even if bucket name is correctly set in first file.

      On the other hand if user defines bucket name property(dl.store.s3.bucket.name=) in second instance property file (e.g. portal-site2.properties), then connection to Amazon S3 starts working and files are being uploaded. But the bucket name is being applied also to first instance eventhough this instance property file (portal-site1.properties) would be empty or had definition of another bucket name.

      In application log we can see loading properties files in following order:
      Loading file: .../webapps/ROOT/WEB-INF/classes/portal-site1.properties for

      {companyId=10900, webId=site1}
      Loading file: .../webapps/ROOT/WEB-INF/classes/portal-ext.properties for {companyId=10900, webId=site1}

      ...
      Loading file: .../webapps/ROOT/WEB-INF/classes/portal-site2.properties for

      {companyId=10613, webId=site2}
      Loading file: .../webapps/ROOT/WEB-INF/classes/portal-ext.properties for {companyId=10613, webId=site2}

        Attachments

          Activity

            People

            Assignee:
            michael.saechang Michael Saechang
            Reporter:
            jan.profiq Jan Hájovský (Inactive)
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              7 years, 42 weeks, 1 day ago

                Packages

                Version Package