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

Purge all cache does not purge customised language strings

    Details

    • Testing Instructions:
      Hide

      Setup

      1. Access as an admin
      2. Add a lang pack to your Moodle other than the default English lang pack
      3. Go to Site administration ► Language ► Language customisation
      4. Choose the extra language and open it for editing
      5. Select a component, eg. access.php
      6. Translate the first string to some string, eg. xxx
      7. Save changes to the language pack
      8. Go to the file manager on the server, access to moodledata/lang/xx_local and delete the translated file (eg. access.php)

      Testing scenario

      1. Go to Site administration ► Language ► Language customisation
      2. Choose the extra language and open it for editing again
      3. Select the same component during setup, eg. access.php
        • CHECK your custom translation of the string (e.g. xxx) is gone
      Show
      Setup Access as an admin Add a lang pack to your Moodle other than the default English lang pack Go to Site administration ► Language ► Language customisation Choose the extra language and open it for editing Select a component, eg. access.php Translate the first string to some string, eg. xxx Save changes to the language pack Go to the file manager on the server, access to moodledata/lang/xx_local and delete the translated file (eg. access.php) Testing scenario Go to Site administration ► Language ► Language customisation Choose the extra language and open it for editing again Select the same component during setup, eg. access.php CHECK your custom translation of the string (e.g. xxx) is gone
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull from Repository:
    • Pull 3.3 Branch:
    • Pull 3.4 Branch:
    • Pull Master Branch:
      MDL-55153-master

      Description

      "Purge all cache" should purge all cache, but it doesn't. Locally translated strings remain cached.

      1. Translate some lang strings locally, with or without "Cache all language strings" activated
      2. Delete the translated string in the appropriate lang file or the entire file
      3. Purge all cache

      *) When encountering this issue I had "Cache all language strings" on the pageadmin/settings.php?section=langsettings deactivated, but I am not sure whether the setting was activated when I began to translate the local strings.

      See: https://moodle.org/mod/forum/discuss.php?d=335811

      Additional info:

      In an old Moodle installation I have several strings that are not present in the English nor in the Danish language pack. Nevertheless these strings occur on the page /admin/tool/customlang/edit.php?lng=da. These strings are no longer in use in Moodle (currently 3.4.1+).

      Eg. report_security | check_passwordsaltmain_name.

      Report_security.php have had no strings with an identifier containing 'passwordsalt' since Moodle 2.4. Neither the English nor the Danish report_security.php in my Moodle instance contains strings with 'passwordsalt', but they occur on the page admin/tool/customlang/edit.php?lng=da. And I can not get rid of them. I can purge all cache, delete the folders /moodledata/cache and /moodledata/localcache, delete my browser cache, and have Site administration → Language → Language settings → Cache all language strings deactivated all together, but the strings remain in Moodle!

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  3 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    19/Mar/18

                    Time Tracking

                    Estimated:
                    Original Estimate - 0 minutes
                    0m
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 hour
                    1h