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

Scoping configuration system is not persistent and reusable


    • Type: Bug
    • Status: Verified
    • Resolution: Unresolved
    • Affects Version/s: 7.1.2 CE GA3, 7.1.X
    • Fix Version/s: None
    • Component/s: Core Infrastructure
    • Labels:
    • Fix Priority:
    • OS:
      Windows 10, Windows 7
    • JDK:
      Oracle Sun JDK 8
    • Application Servers:
      Apache Tomcat 9.0.x
    • Browsers:
      Chrome (latest)
    • Databases:
      PostgreSQL 9.4, PostgreSQL 9.6
    • Device Type:


      I'm trying to use the new Configuration API to implement a group scoped configuration on a custom portlet.

      What I need is a global configuration that the administrator can set as a default configuration; then I want to customize that configuration for each site in which I have different requirements.

      I wrote all the Java classes and JSP and it apparently seems to work: the default configuration is correctly saved inside the "configuration" database table as well as the group configuration.

      The "ConfigurationProvider" class correctly reads and returns the right configuration.


      But if I restart the server or just redeploy the bundle, the group configuraton is lost; the record is on the database but the "ConfigurationProvider" doesn't read it and always returns the default configuration. Unfortunately this make the Configuration API useless.


      I attach the JAR file and the sources of my bundle test; I hope my code is correct and did not miss anything.


      Step to reproduce

      1. deploy the attached JAR file
      2. go to Control Panel -> System settings -> Users
      3. click on "Configuration scope test" and enter some values for the 3 configuration fields
      4. save the defaut configuration
      5. go to the members section of the site administration
      6. click on "Configuration Scope Test" portlet
      7. you will see the values from the default configuration set at step 3
      8. now enter the portlet configuration page and change the configuration values
      9. save the portlet configuration
      10. you will see the values from the group configuration set at step 8
      11. now restart the server or redeploy the bundle
      12. refresh or reload the page of step 6
      13. the portlet must display the group configuration but it doesn't; it displays the default configuration




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


              • Created:
                Days since last comment:
                11 weeks, 1 day ago


                Version Package