-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
2.5.9, 2.6.8, 2.7.5, 2.8.3
-
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
- Install a language pack, such as Czech (cs)
- Modify the file moodledata/lang/cs/cs.md5 to make Moodle think it is outdated
- 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.
- 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.
- duplicates
-
MDL-49008 Lang packs can be lost when using the update installed language packs scheduled task
- Closed
- will help resolve
-
MDLSITE-3775 Language packs become uninstalled on moodle.org
- Resolved