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

Deleting selected language pack causes errors

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MDL-72882-master-3
    • 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
      Setup
      1. Log in as admin
      2. Go to Site administration / Language / Language packs
      3. Install the Hebrew language pack
      4. Create a course C1 with the following settings:
        1. Appearance > Force language: Hebrew (he)
      5. Enrol a student in that course. Let's call this student s1.
      6. Go to Site administration / Language / Language settings
      7. In the current site admin page set the default language to Hebrew ("{{עברית ‎(he)‎}}") and press the save button at the bottom of the page.
      Test
      1. Using the language selector dropdown at the top of the page (311) or user dropdown menu (master, top right of the page), change the admin's language to Hebrew.
      2. Reload the Language packs admin page.
      3. Open another browser session (e.g. incognito mode) and log in as s1.
      4. Open the user preferences and set the Preferred language to Hebrew. Save the changes.
      5. Now back to the admin's browser, delete the Hebrew language pack by selecting it and pressing the top of the two buttons below the "installed language packs" list on the right. ("הסרת חבילות השפה שנבחרו")
      6. Go to the Dashboard.
      7. Confirm that the language is now set to English.
      8. Confirm that you don't get any errors.
      9. Go to Site administration / Language / Language settings
      10. Check the default language.
      11. Confirm that it is set to English and you don't see an invalid settings warning.
      12. Back on s1's browser, go to the Dashboard.
      13. Confirm that the language is now set to English.
      14. Confirm that you don't get any errors.
      15. Go to course C1
      16. Confirm that the language is now set to English.
      17. Confirm that you don't get any errors.
      18. Inspect the <html> tag of the page using your browser's dev tools.
      19. Confirm that it's "dir" attribute is set to ""ltr""
      20. Confirm that it's "lang" attribute is set to ""en"
      Show
      Setup Log in as admin Go to Site administration / Language / Language packs Install the Hebrew language pack Create a course C1 with the following settings: Appearance > Force language: Hebrew (he) Enrol a student in that course. Let's call this student s1. Go to Site administration / Language / Language settings In the current site admin page set the default language to Hebrew ("{{עברית ‎(he)‎}}") and press the save button at the bottom of the page. Test Using the language selector dropdown at the top of the page (311) or user dropdown menu (master, top right of the page), change the admin's language to Hebrew. Reload the Language packs admin page. Open another browser session (e.g. incognito mode) and log in as s1. Open the user preferences and set the Preferred language to Hebrew. Save the changes. Now back to the admin's browser, delete the Hebrew language pack by selecting it and pressing the top of the two buttons below the "installed language packs" list on the right. (" הסרת חבילות השפה שנבחרו ") 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. Go to course C1 Confirm that the language is now set to English. Confirm that you don't get any errors. Inspect the <html> tag of the page using your browser's dev tools. Confirm that it's " dir " attribute is set to "" ltr "" Confirm that it's " lang " attribute is set to "" en "

      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()
        

        1. MDL-72882_master.mp4
          3.44 MB
          Angelia Dela Cruz
        2. MDL-72882_v400.mp4
          3.77 MB
          Angelia Dela Cruz
        3. MDL-72882_v311.mp4
          6.22 MB
          Angelia Dela Cruz

            jpataleta Jun Pataleta
            jpataleta Jun Pataleta
            Michael Hawkins Michael Hawkins
            Jake Dallimore Jake Dallimore
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 2 hours, 23 minutes
                1d 2h 23m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.