Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-72882

Deleting selected language pack causes errors

    XMLWordPrintable

Details

    • MOODLE_310_STABLE, MOODLE_311_STABLE
    • MDL-72882-310
    • MDL-72882-311
    • MDL-72882-master
    • Hide

      Add lang=en in the URL to force the language switching.
      Simpler workaround: Log out and then log back in. The default language will be set for the user session.

      Show
      Add lang=en in the URL to force the language switching. Simpler workaround: Log out and then log back in. The default language will be set for the user session.
    • Hide
      1. Log in as admin
      2. Go to Site administration / Language / Language packs
      3. Install any language pack. Let's use the Japanese language pack (might need to run cron to download the language pack if it's not locally available yet)
      4. Go to Site administration / Language / Language settings
      5. Using the language selector dropdown at the top of the page (310, 311) or user dropdown menu (master, top right of the page), change the admin's language to Japanese.
      6. In the current site admin page, set the default language to Japanese (it's the "lang" dropdown) and press the save button at the bottom of the page.
      7. Go back to Site administration / Language / Language packs (<yoursite>/admin/tool/langimport/index.php).
      8. Open another browser session (e.g. incognito mode) and log in as another user. Let's call this user s1.
      9. Open the user preferences and set the Preferred language to Japanese. Save the changes.
      10. Now back to the admin's browser, delete the Japanese language pack by selecting it and pressing the top of the two buttons below the "installed language packs" list. (選択された言語パックをアンインストールする)
      11. Go to the Dashboard.
      12. Confirm that the language is now set to English.
      13. Confirm that you don't get any errors.
      14. Go to Site administration / Language / Language settings
      15. Check the default language.
      16. Confirm that it is set to English and you don't see an invalid settings warning.
      17. Back on s1's browser, go to the Dashboard.
      18. Confirm that the language is now set to English.
      19. Confirm that you don't get any errors.
      Show
      Log in as admin Go to Site administration / Language / Language packs Install any language pack. Let's use the Japanese language pack (might need to run cron to download the language pack if it's not locally available yet) Go to Site administration / Language / Language settings Using the language selector dropdown at the top of the page (310, 311) or user dropdown menu (master, top right of the page), change the admin's language to Japanese. In the current site admin page, set the default language to Japanese (it's the "lang" dropdown) and press the save button at the bottom of the page. Go back to Site administration / Language / Language packs ( <yoursite>/admin/tool/langimport/index.php ). Open another browser session (e.g. incognito mode) and log in as another user. Let's call this user s1. Open the user preferences and set the Preferred language to Japanese. Save the changes. Now back to the admin's browser, delete the Japanese language pack by selecting it and pressing the top of the two buttons below the "installed language packs" list. (選択された言語パックをアンインストールする) Go to the Dashboard. Confirm that the language is now set to English. Confirm that you don't get any errors. Go to Site administration / Language / Language settings Check the default language. Confirm that it is set to English and you don't see an invalid settings warning. Back on s1's browser, go to the Dashboard. Confirm that the language is now set to English. Confirm that you don't get any errors.

    Description

      To reproduce:

      1. Log in as admin
      2. Go to Site administration / Language / Language packs
      3. Install any language pack. Let's use the Japanese language pack (might need to run cron to download the language pack if it's not locally available yet)
      4. Using the language menu change the language to Japanese
      5. Now delete the Japanese language pack.
      6. Go to the Dashboard.
      7. Expected: No errors will happen. The language will be set to the default language.
      8. Actual: The following error is shown:

        lang => Invalid parameter value detected (Invalid external api parameter: the value is "ja", the server was expecting "lang" type): Invalid external api parameter: the value is "ja", the server was expecting "lang" type
        Error code: invalidparameter
        * line 366 of /lib/externallib.php: invalid_parameter_exception thrown
        * line 240 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()
        

      Attachments

        Issue Links

          Activity

            People

              jpataleta Jun Pataleta
              jpataleta Jun Pataleta
              Michael Hawkins Michael Hawkins
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 6 hours, 33 minutes
                  6h 33m