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

ConfiguratorExtension should only return factory configurations if checking for existing factory config

    Details

    • Type: Bug
    • Status: Verified
    • Resolution: Unresolved
    • Affects Version/s: 7.0.X, 7.1.X, Master
    • Fix Version/s: None
    • Component/s: Portal Configuration
    • Labels:
      None
    • Fix Priority:
      3

      Description

      _process method in ConfiguratorExtension.java could return without creating a factory config because a single config with "configurator.url" property could be found by the query.

      (modules/apps/portal-configuration/portal-configuration-extender/src/main/java/com/liferay/portal/configuration/extender/internal/ConfiguratorExtension.java)

      	private void _process(ConfigurationDescription configurationDescription)
      ...
      		if (configurationDescription.getFactoryPid() == null) {
      ...
      		else {
      			configuratorURL =
      				_namespace + "#" + configurationDescription.getPid();
      
      			if (_configurationExists(
      					"(configurator.url=" + configuratorURL + ")")) {
      
      				return;
      			}
      
      			configuration = _configurationAdmin.createFactoryConfiguration(
      				configurationDescription.getFactoryPid(), StringPool.QUESTION);
      		}
      

      It is suggested that we also query for factory pid

      "(&(factory.pid=" + configurationDescription.getFactoryPid() + ")(configurator.url=" + configuratorURL + "))"
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Days since last comment:
                22 weeks ago

                Packages

                Version Package