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

If certain auto-deploy portal properties are set using private plugins installer in 6.1, the ability to modify these properties is lost after upgrading

    Details

      Description

      Description
      Liferay 6.1 had a Plugin Installer portlet, which, among other things, allowed the user to set the values of the following portal properties in the database:

      auto.deploy.blacklist.threshold
      auto.deploy.custom.portlet.xml
      auto.deploy.deploy.dir
      auto.deploy.dest.dir
      auto.deploy.enabled
      auto.deploy.interval
      auto.deploy.jboss.prefix
      auto.deploy.tomcat.conf.dir
      auto.deploy.tomcat.lib.dir
      auto.deploy.unpack.war
      plugin.notifications.enabled
      plugin.notifications.packages.ignored
      plugin.repositories.trusted
      plugin.repositories.untrusted
      

      (Note: The auto.deploy.blacklist.threshold property no longer exists; it was removed in LPS-32630.)

      However, the Plugin Installer portlet was removed in Liferay 6.2 and subsequent versions as part of LPS-36226, and there was nothing added to replace it. Thus, in Liferay 6.2 and subsequent versions, it is no longer possible to modify these values via the UI. This is very problematic, because the values persist in the database after an upgrade from 6.1, making it impossible to modify these values at all if you had configured them via the Plugins Installer in 6.1 and upgraded afterwards.

      For properties related to directories (such as auto.deploy.deploy.dir), it is actually extremely likely that a user would want to modify these properties after the upgrade, because the upgraded bundle typically has a different directory name than the old bundle. This makes this bug even more severe.

      The solution will be to use PropsValues instead of PrefsPropsUtil for these properties which can no longer be set in the UI. Additionally, an upgrade process should be created to remove these values from the database.

      One final note is that the two properties auto.deploy.default.dest.dir, auto.deploy.tomcat.dest.dir, and auto.deploy.wildfly.prefix appear not to have ever been settable via the UI, but we are using PrefsPropsUtil for them anyway. This likely happened due to confusion after seeing all the other auto deploy properties using PrefsPropsUtil. These usages of PrefsPropsUtil will also be removed.

      Steps to Reproduce
      1. Start up Liferay 6.1 and log in as the admin user
      2. Navigate to Add (as if to add a portlet to a page) > More... > Install More Applications > Configuration
      3. Modify the "Deploy Directory" value and click Save.
      4. Shut down Liferay and upgrade to the version of Liferay you are testing on.
      5. Observe the following line in the logs:
      [localhost-startStop-1][AutoDeployDir:185] Auto deploy scanner started for {value}

      Expected Result: The value that the auto deploy scanner is started for would be your upgraded bundle's deploy directory (or whatever auto.deploy.deploy dir is set to in your upgraded bundle's portal-ext.properties).
      Actual Result: The value that the auto deploy scanner is started for is the value that you set in step 3, and there is no way to change this.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 33 weeks, 5 days ago