Affects Version/s: Platform 1.12.0
Fix Version/s: Platform 2.0.0
Validation was added in https://issues.openmrs.org/browse/TRUNK-4429 that prevents the list of allowed locales (global property locale.allowed.list) from being saved unless the list includes the default locale. It also prevents default_locale from being saved unless the default locale is in the allowed locales list.
It is possible, however, to install OpenMRS without setting a default locale at all. When this happens, OpenMRS uses en_GB as the default locale (from LocaleUtility.getDefaultLocale()). However, the default list of allowed locales is "en, es, fr, it, pt", from OpenmrsConstants.
This is problematic in 2 ways, because errors are thrown when either property value is inserted:
INFO - LoggingAdvice.invoke(119) |2015-03-03 22:51:53,760| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: locale.allowed.list value: en, es, fr, it, pt,
ERROR - LoggingAdvice.invoke(139) |2015-03-03 22:51:53,793| An error occurred while executing this method.
Current user: daemon
Error message: "en_GB" can not be removed from allowed locales list because it is the default locale
org.openmrs.api.APIException: "en_GB" can not be removed from allowed locales list because it is the default locale
ERROR - Context.checkCoreDataset(1096) |2015-03-03 22:30:59,553| Error while setting core global properties
org.openmrs.api.APIException: "en_GB" is not in allowed locales list
Semantically it makes little sense to have the system default to a locale that is not allowed by default. Therefore one straightforward solution is to allow en_GB by default (or change the default locale to en, which is supported)