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

Invalid value in the 'langlist' filter may lead to empty prefered language selector

    XMLWordPrintable

Details

    • MOODLE_39_STABLE
    • MOODLE_38_STABLE, MOODLE_39_STABLE
    • Hide

      Manual testing is not need - covered by automatic tests.

      If for whatever reason human testing was required:

      1. Login as admin
      2. Navigate to Language > Language packs in site administration
      3. Install Cymraeg (cy) & Dansk (da) language packs
      4. Navigate to Language > Language settings in site administration
      5. Set Languages on language menu (langlist) to: "en|English,cy|Welsh" and save changes
      6. Confirm language menu now shows [ Welsh | English ]
      7. Set langlist to: "en|English,xx|Welsh" and save changes
      8. Confirm you see the error "Invalid language code: xx"
      9. Set langlist to: "en|English,xx" and save changes
      10. Confirm you see the error "Invalid language code: xx"
      11. Set langlist to: "xx|Welsh" and save changes
      12. Confirm you see the error "Invalid language code: xx"
      13. Set langlist to: "xx" and save changes
      14. Confirm you see the error "Invalid language code: xx"
      15. Clear langlist field and save changes
      16. Confirm language menu now shows [ Cymraeg (cy) | Dansk (da) | English (en) ]
      Show
      Manual testing is not need - covered by automatic tests. If for whatever reason human testing was required: Login as admin Navigate to Language > Language packs in site administration Install Cymraeg (cy) & Dansk (da) language packs Navigate to Language > Language settings in site administration Set Languages on language menu (langlist) to: "en|English,cy|Welsh" and save changes Confirm language menu now shows [ Welsh | English ] Set langlist to: "en|English,xx|Welsh" and save changes Confirm you see the error "Invalid language code: xx" Set langlist to: "en|English,xx" and save changes Confirm you see the error "Invalid language code: xx" Set langlist to: "xx|Welsh" and save changes Confirm you see the error "Invalid language code: xx" Set langlist to: "xx" and save changes Confirm you see the error "Invalid language code: xx" Clear langlist field and save changes Confirm language menu now shows [ Cymraeg (cy) | Dansk (da) | English (en) ]

    Description

      If the site admin accidentally misconfigures the 'langlist' field and has a single value there which is not a valid language code, the language selectors are displayed empty.

      This is similar to MDL-69772

      Attachments

        Issue Links

          Activity

            People

              pholden Paul Holden
              mudrd8mz David Mudrák (@mudrd8mz)
              David Mudrák (@mudrd8mz) David Mudrák (@mudrd8mz)
              Adrian Greeve Adrian Greeve
              Janelle Barcega Janelle Barcega
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo, Aya Saad, David Mudrák (@mudrd8mz), Helen Foster, Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Nov/20

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours, 20 minutes
                  3h 20m