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

Tiny 6 editor Localization error when language identifier contains an underscore character

XMLWordPrintable

      The error happens when the user has selected a language which is identified by a code containing an underscore character (ie.: fr_ca). The component Tiny 6 then fails to obtain the translated strings and displays the default english text.

      Error: Cache definition core/string requires simple keys. Invalid key provided.
      Debug info: fr-ca_editor_tiny_1680203058

      Error code: codingerror

      Stack Trace

      line 638 of /cache/classes/helper.php: coding_exception thrown 
      line 1207 of /cache/classes/loaders.php: call to cache_helper::hash_key() 
      line 504 of /cache/classes/loaders.php: call to cache->parse_key() 
      line 1860 of /cache/classes/loaders.php: call to cache->get_implementation() 
      line 405 of /cache/classes/loaders.php: call to cache_application->get_implementation() 
      line 124 of /lib/classes/string_manager_standard.php: call to cache->get() 
      line 170 of /lib/editor/tiny/lang.php: call to core_string_manager_standard->load_component_strings() 
      line 104 of /lib/editor/tiny/lang.php: call to editor_tiny\lang->load_language_pack() 
      line 58 of /lib/editor/tiny/lang.php: call to editor_tiny\lang->serve_file() 
      line 352 of /lib/editor/tiny/lang.php: call to editor_tiny\lang->__construct() 

      Choosing another language without an underscore character works fine (en, fr, etc.).

      What's also interesting is how the language identifier is shown in the debug information just below the error (with an hyphen).

            Unassigned Unassigned
            Jeff Noel Jeff Noel
            Votes:
            0 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.