How to solve "Exception: Violation for language value" during Upgrade process?

I'm using the CliUpgrade.php script to upgrade my instance, but I'm getting following error while upgrading to v11:

Starting script 7_RenameModules
ERROR: Exception: Violation for language value
Finished script 7_RenameModules
I looked at the upgrade script 7_RenameModules.php, the script fails at line 36:
$strings = $this->getAppListStrings($langKey);
The method getAppListStrings is defined in the same file on lines 149-157:
/**
* @param string $lang
*
* @return array
*/
protected function getAppListStrings($lang)
{
   return return_app_list_strings_language($lang, false);
The method return_app_list_strings_language is defined in the include\utils.php and executes a language validation at line:
$violations = Validator::getService()->validate($lang, new Language());
if ($violations->count() > 0) {
throw new ViolationException(
'Violation for language value',
$violations
);
}
which throws the Exception above.

I get this error on each upgrade process (v9 -> v10, v10 -> v11) and when I rerun the CliUpgrade.php script with the -S continue argument the upgrade process succeeds without any errors.

Any suggestions on how to solve this? Because it is annoying and irritating.

Thank you in advance.

  • Hello

    From your description, the issue seems related to the following defect #82818( portal.sugarondemand.com/ ).

    To be sure can you restore the languages parameter to the stock value in config.php of a test instance and retry to check if the error persists? 

    These are the default values: 

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    'languages' =>
    array (
    'en_us' => 'English (US)',
    'bg_BG' => 'Български',
    'cs_CZ' => 'Česky',
    'da_DK' => 'Dansk',
    'de_DE' => 'Deutsch',
    'el_EL' => 'Ελληνικά',
    'es_ES' => 'Español',
    'fr_FR' => 'Français',
    'he_IL' => 'עברית',
    'hu_HU' => 'Magyar',
    'hr_HR' => 'Hrvatski',
    'it_it' => 'Italiano',
    'lt_LT' => 'Lietuvių',
    'ja_JP' => '',
    'ko_KR' => '',
    'lv_LV' => 'Latviešu',
    'nb_NO' => 'Norsk',
    'nl_NL' => 'Nederlands',
    'pl_PL' => 'Polski',
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Andre, 

    you're my hero. It worked! Thank you.

  • Awesome! Perfect Friday outcome Beers