Can I change a single configuration value with the help of a .config file?

Issue

  • I would like to change just a single configuration value with the help of a .config file.
  • I would like to know if it is possible to enter this single value in my .config file or whether the file has to contain all configurations.

 

Environment

  • Liferay DXP 7.0+

 

Resolution

  • Yes, it is possible to enter just a single (or a few) configuration values in a.config file and those values will be applied as necessary.
  • Please consider the following scenario:
  1. Start a clean Liferay 7.2 environment
  2. Navigate to Control Panel > System Settings > Template Engines > FreeMarker Engine
  3. Scroll down to the bottom to see that the default value for Template Exception Handler is "rethrow"
  4. Add a .config file in osgi\configs named com.liferay.portal.template.freemarker.configuration.FreeMarkerEngineConfiguration.config and add this entry only: templateExceptionHandler="ignore"
  5. Restart the portal
  6. Navigate to Control Panel > System Settings > Template Engines > FreeMarker Engine

Result: The value for Template Exception Handler changed to "ignore". 

 

Additional Information

Was this article helpful?
0 out of 0 found this helpful