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

System Settings are not properly stored and cannot be properly retrieved from the database when comments are included in a configuration file

    Details

      Description

      Description

      When a configuration file is used to provide a System Setting and the file contains a comment, the configuration is improperly stored in the database.

      This may lead to inconsistent behavior, such as:

      • Orphaned configuration entries in the database
      • Inability to read the configuration entry that is stored in the database

      Steps to Reproduce

      1. Start Liferay and wait for startup to complete
      2. Check database table: Configuration_
        • Notice that there is no entry for
          com.liferay.blogs.configuration.BlogsConfiguration
          
      3. Create configuration file: [LIFERAY_HOME]/osgi/configs/com.liferay.blogs.configuration.BlogsConfiguration.config
        foobar=["foo","bar"]
        
      4. Wait for 30 seconds
      5. Check database table: Configuration_ for the entry:
        com.liferay.blogs.configuration.BlogsConfiguration
        
        • Notice that an entry now exists
      6. Shutdown Liferay
      7. Remove configuration file: [LIFERAY_HOME]/osgi/configs/com.liferay.blogs.configuration.BlogsConfiguration.config
      8. Startup Liferay and wait for startup to complete
      9. Check database table: Configuration_ for the entry:
        com.liferay.blogs.configuration.BlogsConfiguration
        
        • Notice that the entry is now gone
      10. Next, let's test with a comment
      11. Create configuration file with a comment: [LIFERAY_HOME]/osgi/configs/com.liferay.blogs.configuration.BlogsConfiguration.config
        #foobar=["foo","bar"]
        
      12. Repeat steps 4-9

      Expected Result
      The configuration entry has been removed

      Actual Result
      The configuration entry still exists

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                peyton.zhao Peyton Zhao (Inactive)
                Reporter:
                eric.yan Eric Yan
                Participants of an Issue:
                Recent user:
                Clarissa Velazquez
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  37 weeks, 2 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP72
                  7.0.10.11 DXP SP11
                  7.0.X
                  7.1.10 DXP FP7
                  7.1.10.2 SP2
                  7.1.3 CE GA4
                  7.1.X
                  Master