-
Bug
-
Resolution: Fixed
-
Critical
-
4.3.1
After the last upgrade that I did yesterday (4.3.1 / 20231211), I got an error with every user that has pt_br (Portuguese of Brazil) as his language.
It was only fixed when I installed pt (Portuguese of Portugal) language pack. It was an Ajax or JavaScript error.
Addendum
This is as a result of MDL-80185, which now uses the ISO 639-1 code of the current language pack in order to meet accessibility criteria for the current page (see that issue for context)
However, we also need a means to get the Moodle language code inside Javascript as described by joãopedro in that same issue. See also this forum thread
We should update the langconfig for the "Portuguese - Brazil" language pack too, because it currently uses the value "en" which is wrong, it should be "pt-br": https://lang.moodle.org/local/amos/view.php?t=1702387094&v=l&l=pt_br&c=langconfig&s&d=iso6391
Example error
Invalid external api parameter: the value is "nb", the server was expecting "lang" type Error code: invalidparameter
|
* line 367 of /lib/externallib.php: invalid_parameter_exception thrown
|
* line 241 of /lib/externallib.php: call to external_api::validate_parameters()
|
* line 81 of /lib/ajax/service.php: call to external_api::call_external_function()
|
* line 33 of /lib/ajax/service-nologin.php: call to require_once()
|
Update 20 Dec 2023: The pt_br lang string iso6391 in core_langconfig has been updated in AMOS, also for a number of other languages. Sites using these language packs will find the bug resolved with a language pack update.
However, some languages, such as zh_cn and sr_lt also require code changes to resolve the bug. In other words, sites using these languages need to upgrade to 4.1.8, 4.2.5 or 4.3.2 to resolve the bug.
- has a non-specific relationship to
-
MDLSITE-2191 Check and correct the iso6391 and iso6392 strings in each lang pack
- Open
- is a regression caused by
-
MDL-80185 Invalid language attribute on html tag for languages such as en_wp and de_kids
- Closed
- is duplicated by
-
MDL-80411 Norwegian language pack = invalid parameter error
- Closed