Enrolling Users Error

Enrolling Users Error

by John Sanderbeck -
Number of replies: 2

I recently setup a new Moodle 3.7+ server running on NGINX with PHP 7.2 and PHP-FPM.

Everything appears to be working great however I am getting an error when I try to enroll users in a course.

I have attached a screenshot of the error.

Not seeing any errors relating to this in the error logs.

Any help here would be GREATLY appreciated...

Could this be a theme issue?  Using the Klass theme currently...

John Sanderbeck

Attachment moodle error.png
Average of ratings: -
In reply to John Sanderbeck

Re: Enrolling Users Error

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The easiest way to figure out if it is a theme issue is to try a different theme. Switch to (core) Boost and see if that makes any difference.

Failing that, open your web server's Javascript console, reproduce the problem and check for any (red) errors in the console.
In reply to John Sanderbeck

Re: Enrolling Users Error

by John Sanderbeck -
I turned on debugging and found that there were spaces at the end of some of my users e-mails.

That was what was causing the issue.

This is the error I was receiving...

email => Invalid response value detected: Invalid external api response: the value is "fakeemail@anywhere.org " of PHP type "string", the server was expecting "raw_trimmed" type
Error code: invalidresponse
* line 442 of /lib/externallib.php: invalid_response_exception thrown
* line 457 of /lib/externallib.php: call to external_api::clean_returnvalue()
* line 250 of /lib/externallib.php: call to external_api::clean_returnvalue()
* line 59 of /lib/ajax/service.php: call to external_api::call_external_function()