Syntax Error Regarding Manual User Enrolment

Syntax Error Regarding Manual User Enrolment

by Learning Management System -
Number of replies: 8

 Hi,

     I am facing an error regarding Manual User Enrolment. When I click on 'ENROL USERS' option, it popups a Syntax Error:

     

     JSON.parse: expected ',' or '}' after property value in object at line 1 column 35120 of the JSON data


    I am not sure which file needs to be updated as I haven't updated any piece of code. Kindly guide accordingly...

Attachment Screenshot_2019-02-11 ITCee Participants.png
Average of ratings: -
In reply to Learning Management System

Re: Syntax Error Regarding Manual User Enrolment

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hello,
you should mention your Moodle version: it could be a bug of an old version or a new one e.g. due to some special characters used in the "name" of one/some of your users.

You should debug it by inspecting the actual HTTP Response sent by Moodle, using the Developer Tools of your browser to help understanding why such a missing (the ,) on listing your users.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: Syntax Error Regarding Manual User Enrolment

by Learning Management System -

Hi Matteo,

Thank you for this direction. My Moodle version is:

3.5.1+ (Build: 20180824)


In reply to Learning Management System

Re: Syntax Error Regarding Manual User Enrolment

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Please turn on full developer debugging and then see if you get a more detailed error message and post here.

In reply to Emma Richardson

Re: Syntax Error Regarding Manual User Enrolment

by Learning Management System -

Thank you, Emma!

Here is the snap of detailed error:

Syntax Error

In reply to Learning Management System

Re: Syntax Error Regarding Manual User Enrolment

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

That seems strange.  How did you upgrade exactly?

In reply to Emma Richardson

Re: Syntax Error Regarding Manual User Enrolment

by Learning Management System -

Dear Emma,

      We didn't upgrade the Moodle. It was working fine and then it started this behaviour.

In reply to Learning Management System

Re: Syntax Error Regarding Manual User Enrolment

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hello,
you should debug it looking at the actual response sent by your Moodle server: unfortunately Moodle doesn't show you the plain response in case of issues like yours about a malformed JSON so you need to capture and inspect it by your own, by "simply" using the Developer Tools of your browser.

An example about how to do it for a different issue: https://tracker.moodle.org/browse/MDL-60691?focusedCommentId=597479&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-597479

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: Syntax Error Regarding Manual User Enrolment

by Learning Management System -

Hi,

Thank you, Matteo and every one in the thread!

It's very strange but it was an issue with the browser. I came to know when I open ran it on the hosted server. It seems to me like this is an issue on updated browsers because same process works on older versions. Thank you again.