Forums | Mahara Community

Mahara/Moodle integration /
XMLRPC Plugin hidden field


Lukas Jahn's profile picture
Posts: 5

19 November 2019, 21:37

Hi, Sorry, I've post it in the wrong forum, so I repost.

 

I installed Mahara 19.10 (with OS Ubuntu 18.04, php 7.2)

When I add XML-RPC auth there aren't field

-Import content

-Autocreate user

-Update user on login

I tried with mahara 18.04 and all is ok.

The field are hidden in the modal windows.

What is the problem? or I need to configure other?

Thanks

 

NB: I have networking on.

Robert Lyon's profile picture
Posts: 773

20 November 2019, 7:48

Hi Lukas

There is a mistake in the code which was made when we switched from having the authentication configuration form being on another page to the new way where it is a modal window.

We were not fetching the values of certain fields correctly

I've made a fix for this problem https://reviews.mahara.org/#/c/10615/

Please try the fix and let me know if that works

Cheers

Robert

Lukas Jahn's profile picture
Posts: 5

21 November 2019, 4:17

Ok, all is ok.

The fix is ok.

Now all is ok but when I try to link from Moodle to Mahara, I have this problem:

[WAR] 1e (auth/user.php:336) First parameter must either be an object or the name of an existing class
Call stack (most recent first):
  • log_message("First parameter must either be an object or the na...", 8, true, true, "/var/www/mahara/auth/user.php", 336) at /var/www/mahara/lib/errors.php:521
  • error(2, "First parameter must either be an object or the na...", "/var/www/mahara/auth/user.php", 336, array(size 3)) at Unknown:0
  • property_exists(false, "probation") at /var/www/mahara/auth/user.php:336
  • User->populate(false) at /var/www/mahara/auth/user.php:287
  • User->find_by_instanceid_username("33", "prova", true) at /var/www/mahara/auth/xmlrpc/lib.php:154
  • AuthXmlrpc->request_user_authorise("951b04ce07b8f803ba7da13f3cf7b93085661b41", "httpsite") at /var/www/mahara/auth/xmlrpc/land.php:78
it seems to be failing to query DB, because the User->populate (false).
 
Param are:
- user update on login
-autocreate user on
 
Thanks.
Robert Lyon's profile picture
Posts: 773

21 November 2019, 9:01

Hi Lukas

Thank you for letting me know that patch worked

For you new problem I've made another patch

https://reviews.mahara.org/#/c/10618/

Can you let me know if that fixes the new problem

Cheers

Robert

Lukas Jahn's profile picture
Posts: 5

22 November 2019, 3:59

Ok, all is ok.

You are fantastic!

Thank you.

Lukas Jahn's profile picture
Posts: 5

24 November 2019, 6:09

Ok, there is another little problem. When I add anXMLRPC plugin, just configured, and I submit that, I receive this:

[WAR] ca (lib/peer.php:165) file_get_contents(https://mysite): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
Call stack (most recent first):
  • log_message(string(size 123), integer, true, true, string(size 28), integer) at /var/www/mahara/lib/errors.php:521
  • error(integer, string(size 123), string(size 28), integer, array(size 7)) at Unknown:0
  • file_get_contents(string(size 34)) at /var/www/mahara/lib/peer.php:165
  • Peer->bootstrap(string(size 34), null, string(size 6), string(size 9)) at /var/www/mahara/auth/xmlrpc/lib.php:935
  • PluginAuthXmlrpc::save_instance_config_options(array(size 26), object(Pieform)) at /var/www/mahara/lib/mahara.php:1817
  • call_static_method(string(size 16), string(size 28), array(size 25), object(Pieform)) at /var/www/mahara/admin/users/addauthority.php:131
  • auth_config_submit(object(Pieform), array(size 25)) at /var/www/mahara/lib/pieforms/pieform.php:546
  • Pieform->__construct(array(size 9)) at /var/www/mahara/lib/mahara.php:5422
  • pieform_instance(array(size 9)) at /var/www/mahara/admin/users/addauthority.php:83

despite this all is ok, and I can use the institution.

Thanks

Robert Scally's profile picture
Posts: 8

27 November 2019, 2:29

Hi Robert,

 

I got the same issue as Lukas. I applied the two patches you referred to

and that fixed the initial issue. But when I use SSO from Moodle to Mahara, I get the 

following issue:

"Unable to sign in via SSO.
We were unable to authenticate you at this time. Possible reasons might be:

* Your SSO session might have expired. Go back to the other application and click the link to sign into Mahara again.
* You may not be allowed to SSO to Mahara. Please check with your administrator if you think you should be allowed to."

And in the error log:

<pre>
[Tue Nov 26 13:21:13.518511 2019] [php7:notice] [pid 337] [client 172.31.100.1:41190] [DBG] ee (auth/xmlrpc/lib.php:173) User authorisation request from MOODLE_WEBSITE_URL failed - remote user 'admin' is unknown to us and auto creation of users is turned off, referer: http://MOODLE_SITE_URL/my/

</pre>

 

I also don't see the following option anymore in the XML-RPC settings in 19.10.1 even though it

is still in the documentation https://manual.mahara.org/en/19.10/administration/institutions.html:

"We auto-create users" and this may be causing the issue as I cannot set it. Is there a setting to enable this

setting to appear?

 

 

Best Regards,

Robert

Robert Scally's profile picture
Posts: 8

27 November 2019, 5:31

Hi Robert,

 

Please ignore my last post. It is working for me now. Must have been something else causing those 

settings to not appear.

Thanks for the patches.

 

Best Regards,

Robert

8 results