Joomdle 2.x Installation

Getting an error: Web services error: Invalid response value detected

  • Eric vanBok
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 9 months ago #1 by Eric vanBok
My host migrated me to a new server, and on two of the 3 Joomla/Joomdle/Moodle websites I have I am getting the following error when I try to look at my list of courses within Joomla as a student.

Web services error: Invalid response value detected

The Joomdle system check is show all green checkmarks so all appears to be set up and working properly, but something obviously has changed causing this issue. If I turn on debugging in Moodle, the error goes away and it says I don't have any courses, which I know isn't the case.

I haven't run into this issue before. Has anyone here seen this before, and if so how did you fix it?

Thank you.

Please Log in or Create an account to join the conversation.

More
1 year 9 months ago #2 by Antonio Durán
Hi.

Are other Joomdle pages working?
For example: YOUR_SITE/index.php?option=com_joomdle&view=joomdle

The error is thrown by Moodle when there something wrong with the web service reply, but I cannot tell you what...

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #3 by Atle Johnsen
I am also getting the same error during login. With debugger in Moodle set to all I get this:
COM_JOOMDLE_WEB_SERVICES_ERROR: Invalid parameter value detected (Missing required key in single structure: username)

Similar error I get from Joomla backend when I select Joomdle extension - users, then message is (missing required key in single structure: search)
Also trying to select Moodle wrapper in a new menu item give error (Missing required key in single structure: enrollable_only)

When using connection methode file_get_contents in Joomla and Moodle I get all green on Joomdle system check, but if I select cURL I get Moodle cannot connect to Joomla, as well as Receive empty response from Moodle. I have tested this on Joomla 4.4.3 and Moodle 4.2.10/4.3.7.
All the errors mentioned is thrown when using the file_get_contents methode. Using cURL methode bacically breaks communication to moodle.

However, on the same server I have another joomla 4.4.3/moodle 4.2.10 site which works perfect. So I am really confused. The only difference on this site is that it has been upgraded several times from an older version, while the above mentioned happens to fresh installs. My working site was migrated over from a VPS running Centos 7 OS which has reached End Of Life, while the new server is running on Almalinux 9 OS. My sites are using php 8.2.
Any ideas ?

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #4 by Antonio Durán
Hi.

I don't know what may be causing your issues...
I checked 2 of your issues, and it looks like the server is not correctly passing empty values or something like that: both search and enrollable_only should be empty/0 in the calls you mention.

To see if the problem is really related, you can try this:
- Edit file administrator/components/com_joomdle/models/users.php
- In _getData function, after:
$search = $this->getState ('filter.search');
Add:
$search = "some user of yours";

And then open the users screen to see if you still get the error or you correctly see your user.

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #5 by Atle Johnsen
I did the code change as you suggested. With methode file_get_contents in config setting I get the same error message as previously mentioned. With cURL selected I get my user details shown with green tick on Joomla account, but nothing on Moodle or Joomdle user.

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #6 by Antonio Durán
Which Joomdle version are your running?
Do you get all green in system check?

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #7 by Atle Johnsen
I am using latest (2.3.1) version. When methode file_get_contents is set in configuration settings in joomdle then system check is showing all green, but when curl is selected in configuration settings then the 2 lower ones show red.

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #8 by Atle Johnsen
For info, the error is not showing up on the front page when I disable System-Joomdlesession plugin. Does this plugin call any undefined function xmlrpc_encode_request ?

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #9 by Antonio Durán
> For info, the error is not showing up on the front page when I disable System-Joomdlesession plugin. Does this plugin call any undefined function xmlrpc_encode_request ?

Not really... I just checked it and it is using normal calls, so it should be the same as other Joomdle features.

> I am using latest (2.3.1) version.

Ok...if you are using the same version in another site in the same server, some configuration must be different ....but I cannot tell you what from here, sorry.

If you want me to take a look, you can write to antonio at joomdle

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #10 by Antonio Durán
For reference: the problem was an incorrect configuration of the Moodle URL, as it included www but the real URL did not.
Usually this will break the system check, but in this case that worked and the problem presented itself in other places... no idea why, as this is the first time I have seen this.

Please Log in or Create an account to join the conversation.