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

Date selector stopped working in non-utf8 locales

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 3.0.3
    • Forms Library
    • None
    • MOODLE_30_STABLE
    • Hide

      Use locale fi_FI.utf-8 or leave blank

      Show
      Use locale fi_FI.utf-8 or leave blank
    • Hide

      1. Go to Site administration >> Language >> Language settings
      2. set Sitewide locale: fi_FI
      3. Open a Quiz
      4. Select Edit settings

      Alternatively you can create new Quiz

      Show
      1. Go to Site administration >> Language >> Language settings 2. set Sitewide locale: fi_FI 3. Open a Quiz 4. Select Edit settings Alternatively you can create new Quiz

      When upgrading from 3.0.3+ Build 201607 to 20160422 and non utf8-locale (like fi_FI or sv_SE) is used, the Quiz edit view becomes nonfunctional, because of Javascript error on line 84 of theme/yui_combo.php.

      Debugger error message:
      TypeError: t is undefined
      M.form.dateselector.initPanel()
      yui_combo.php:84
      M.form.dateselector.init_date_selectors()
      yui_combo.php:84
      <anonymous>
      modedit.php:1148
      e._notify()
      yui_combo.php:9
      e.use/<()
      yui_combo.php:9
      e._notify()
      yui_combo.php:9
      e._use/T()
      yui_combo.php:9
      e.Loader.prototype._finish()
      yui_combo.php:16
      e.Loader.prototype._onSuccess()
      yui_combo.php:16
      e.Loader.prototype._insert/p()
      yui_combo.php:17
      e.Loader.prototype._insert()
      yui_combo.php:17
      e.Loader.prototype._insert/p()
      yui_combo.php:17
      e.Loader.prototype._insert/<.onSuccess()
      yui_combo.php:17
      s.prototype._finish()
      yui_combo.php:12
      s.prototype._next()
      yui_combo.php:12
      s.prototype._progress()
      yui_combo.php:13
      h()
      yui_combo.php:12
      yui_combo.php:84:1491

      Debugging using the non-minimized version (moodle-form-dateselector.js) of
      lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector-min.js
      reveals that error occurs because config is not defined on line 87:
      firstdayofweek: parseInt(config.firstdayofweek, 10),

      This error does not appear if locale is left blank or UTF-8-locale (like if_FI.utf-8) is used on the "Language settings" -page. fi_FI is given as an example locale in the Finnish version of the Language settings.

      Nonfunctional means that it is not possible to change Timing, Grade etc. -settings. Also the editor is not visible on the Description -field.

      To reproduce the problem:
      1. Go to Site administration >> Language >> Language settings
      2. set Sitewide locale: fi_FI
      3. Open a Quiz
      4. Select Edit settings
      Alternatively you can create new Quiz

            Unassigned Unassigned
            marmanen Matti Ärmänen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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