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

Language Pack: Syntax Error - Unexpected token < in JSON at position 0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • 3.2.5, 3.3.2, 3.4, 3.5.1
    • Caching, JavaScript, Language
    • MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE

      I installed a fresh installation of Moodle 3.4rc1 (Build: 20171103) today. Once the installation was completed, I immediately click Dashboard > Site administration > Language > Language packs, and got the following error message dialog:

      Syntax Error

      Unexpected token < in JSON at position 0

      The error message varied each time the page was reloaded. Sometimes it would just say "Undefined".

      When I repeated the process with debugging set to DEVELOPER, additional stack trace information was made available:

      {{SyntaxError: Unexpected token < in JSON at position 0 }}

      {{at parse (<anonymous>) at Qb (http://localhost/moodle34/lib/javascript.php/1509831445/lib/jquery/jquery-3.2.1.min.js:1:74283) }}

      at A (http://localhost/moodle34/lib/javascript.php/1509831445/lib/jquery/jquery-3.2.1.min.js:1:77810)

      at XMLHttpRequest.<anonymous> (http://localhost/moodle34/lib/javascript.php/1509831445/lib/jquery/jquery-3.2.1.min.js:1:80414)

      This happens while the screen is loading - before I've had a chance to do anything else on thus screen. I repeated the process with both BOOST and Clean themes but got the same result.

      My environment includes Apache 2.4, PHP 7.0.24, MySQL 5.6.38. My web browser is Chrome 61.0.3163.100 (Official Build) (64-bit) for Windows. The only warning during the installation of Moodle was that I am not running on https.

      Let me know if you require any additional information.

      Best regards,

      Michael Milette

        1. image-2017-11-08-03-03-57-037.png
          43 kB
          Michael Milette
        2. image-2017-11-08-03-17-18-526.png
          27 kB
          Michael Milette
        3. image-2017-11-08-03-26-42-736.png
          10 kB
          Michael Milette
        4. image-2017-11-08-03-27-41-593.png
          27 kB
          Michael Milette
        5. image-2017-12-14-15-50-14-003.png
          32 kB
          Michael Milette
        6. image-2017-12-15-10-38-40-606.png
          66 kB
          Michael Milette
        7. image-2019-01-22-09-08-23-020.png
          32 kB
          Sebastian Peipher
        8. image-2022-11-29-16-05-23-645.png
          9 kB
          Tommy Légaré
        9. screenshot-1.png
          176 kB
          Reem Tohmaz
        10. Untitled-1.png
          12 kB
          Reem Tohmaz

            Votes:
            14 Vote for this issue
            Watchers:
            27 Start watching this issue

              Created:
              Updated:
              Resolved:

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