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

Language pack uninstalled if updating it fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.5.9, 2.6.8, 2.7.5, 2.8.3
    • Administration, Language
    • MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE

      This has been reported at moodle.org in MDLSITE-3775. Some language packages disappeared. fox had a suspicion that Moodle first removes the existing lang directory and only then it tries to replace it with the new language pack folder. If the second part fails (such as due to connectivity issue), the language disappears. This is pretty silent especially when language packs are updated via the scheduled task.

      I am able to reproduce this problem both via admin UI (using the "Update all installed language packs" button) and via the task (executing it via CLI).

      The weird thing is that the network downtime would have to happen exactly between the list of updateable languages is fetched (lang_installer::get_remote_list_of_languages()) and when the languages are being actually fetched. As it happens in the same request, it's effectively the same second or two. Because of this, I am not 100% sure that MDLSITE-3775 was definitely caused by this. Anyway, having the lang installer more careful should not harm.

      Steps to reproduce

      1. Install a language pack, such as Czech (cs)
      2. Modify the file moodledata/lang/cs/cs.md5 to make Moodle think it is outdated
      3. Modify the URL to a non-existing one (such as "download.moodle.ork") in the lang_installer::install_language_pack() method to simulate the connectivity issue.
      4. Update all installed language packs - either via the UI or the task

      Exected result

      The language pack should stay installed. Ideally, some error message or notification should be displayed.

      What actually happens

      The language pack disappears with no error or notification.

            Unassigned Unassigned
            mudrd8mz David Mudrák (@mudrd8mz)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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