Commit 95ed3279 authored by Adrian Rossouw's avatar Adrian Rossouw

Only validate the language selection on a site when it is being created. Once...

Only validate the language selection on a site when it is being created. Once it is installed, the language has already been imported. issue #831304
parent 6b162af6
......@@ -450,7 +450,9 @@ function hosting_site_validate($node, &$form) {
if (!array_key_exists($node->profile, hosting_get_profiles($node->platform))) {
form_set_error('profile', t('Please fill in a valid profile'));
}
if (!array_key_exists($node->site_language, hosting_get_profile_languages($node->profile, $node->platform))) {
// Check that we are selecting a valid language for this profile, but only when a new site is created.
if (!array_key_exists($node->site_language, hosting_get_profile_languages($node->profile, $node->platform)) && !$node->nid) {
form_set_error('site_language', t('Please fill in a valid language'));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment