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

Timeline block throws JSON error when course full name contains a backspace

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.11.8, 4.0.2
    • Dashboard (My home)
    • None
    • MOODLE_311_STABLE, MOODLE_400_STABLE

      Scenario:

      1. Login as admin, turn debugging on (DEVELOPER level + Display debug messages),
      2. Create a course with a backslash \ character included in its full / long name.
      3. Add an activity with a due date (e.g. Assignment).
      4. Enrol Student A.
      5. Log in as Student A.
      6. Visit the Dashboard/Timeline page (Moodle 4) or the Dashboard page containing the Timeline block (Moodle 3).
      7. Instead of properly loading, Moodle will show a modal with an alert like this:

      JSON.parse: bad escaped character at line 1 column 146 of the JSON data
      File: https://YOUR_MOODLE_URL/lib/requirejs.php/1660337173/core/first.js
      Line: 17
      Stack trace:

      ln: 6772
      https://YOUR_MOODLE_URL/lib/requirejs.php
      Renderer.prototype.stringHelper

      ln: 7005
      https://YOUR_MOODLE_URL/lib/requirejs.php
      Renderer.prototype.cleanStringHelper

      ln: 8305
      https://YOUR_MOODLE_URL/lib/requirejs.php
      Renderer.prototype.addHelperFunction/</<

      ln: 8035
      https://YOUR_MOODLE_URL/lib/requirejs.php
      factory/Writer.prototype.renderSection

      ln: 6836
      https://YOUR_MOODLE_URL/lib/requirejs.php
      factory/Writer.prototype.renderTokens

      ln: 9198
      https://YOUR_MOODLE_URL/lib/requirejs.php
      factory/Writer.prototype.renderPartial

      ln: 6995
      https://YOUR_MOODLE_URL/lib/requirejs.php
      factory/Writer.prototype.renderTokens

      ln: 7634
      https://YOUR_MOODLE_URL/lib/requirejs.php
      factory/Writer.prototype.renderSection

      ln: 6836
      https://YOUR_MOODLE_URL/lib/requirejs.php
      factory/Writer.prototype.renderTokens

      ln: 9198
      https://YOUR_MOODLE_URL/lib/requirejs.php
      factory/Writer.prototype.renderPartial

      ln: 6995
      https://YOUR_MOODLE_URL/lib/requirejs.php
      factory/Writer.prototype.renderTokens

      ln: 7634
      https://YOUR_MOODLE_URL/lib/requirejs.php
      factory/Writer.prototype.renderSection

      ln: 6836
      https://YOUR_MOODLE_URL/lib/requirejs.php
      factory/Writer.prototype.renderTokens

      ln: 6556
      https://YOUR_MOODLE_URL/lib/requirejs.php
      factory/Writer.prototype.render

      ln: 10893
      https://YOUR_MOODLE_URL/lib/requirejs.php
      factory/mustache.render

      ln: 10546
      https://YOUR_MOODLE_URL/lib/requirejs.php
      Renderer.prototype.doRender/<

      ln: 30005
      https://YOUR_MOODLE_URL/lib/javascript.ph
      e

      ln: 30307
      https://YOUR_MOODLE_URL/lib/javascript.ph
      Deferred/then/l/</t<

       

      Also checked: Calendar, My courses page (M4) + Dashboard/Course overview (M3), Recently accessed courses block, Upcoming activities course block - no issues there.

            Unassigned Unassigned
            pmk Przemek Kaszubski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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