invalid external parameter : expecting "url"

invalid external parameter : expecting "url"

by Lionel L -
Number of replies: 3
Hi there!

I'm on a fresh install of Moodle v4.4dev on an Amazon Linux 2 EC2 instance and I'm experiencing an invalid parameter error everytime I access a course with the following log value :

pageurl => Valeur incorrecte de paramètre détectée (Invalid external api parameter: the value is "http://my_moodle.url/my/courses.php", the server was expecting "url" type): Invalid external api parameter: the value is "http://my_moodle.url/my/courses.php", the server was expecting "url" type
Error code: invalidparameter
* line 362 of /lib/external/classes/external_api.php: invalid_parameter_exception thrown
* line ? of unknownfile: call to core_external\external_api::validate_parameters()
* line 228 of /lib/external/classes/external_api.php: call to call_user_func()
* line 83 of /lib/ajax/service.php: call to core_external\external_api::call_external_function()
I also have an "Invalid return value detected" when I want to add an activity but I cant get detailed information on this pop-up message...

I've no extra plugin installed.

Do you have an idea for resolving this issue?

Average of ratings: -
In reply to Lionel L

Re: invalid external parameter : expecting "url"

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

4.4dev is the unstable development branch of Moodle due for release in April 2024. It's expected to have errors. Hopefully you don't have this on a production site.

People in this forum are unlikely to be using unstable versions. If you still want to work with 4.4dev the Moodle Dev chat room might be the best place to ask questions.

The latest supported version is Moodle 4.3 so you should instead install this for a stable Moodle environment.

In reply to Lionel L

Re: invalid external parameter : expecting "url"

by Paul Holden -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Lionel,

At a guess (because you've obfuscated the actual URL), does your hostname contain an underscore character? See this issue and the linked issues in the comments for more
Average of ratings:Useful (2)
In reply to Paul Holden

Re: invalid external parameter : expecting "url"

by Lionel L -
Hi Paul,

Thank you so much! It was only that... I thougth it was because I have a number in my URL but didn't think that it could be the underscore...