cannod / moodle-drupalservices

Moodle plugin to connect to Drupal services
36 stars 25 forks source link

Can't get authentication working on Moodle 3 #79

Open vittala23 opened 7 years ago

vittala23 commented 7 years ago

Hello, I had the authentication working on Moodle 2.7 and am trying to upgrade to 3.x. The upgrade went ok and I installed the 3x supported plugin but when I go to setup my Drupal Services authentication settings I only can get as far as the URL and none of the other setting show. Here is what I see on Drupal debugging:

Using preconfigured values: stdClass Object ( [cohorts] => 0 [cohort_view] => [cookiedomain] => [endpoint] => /drupalservice [field_lock_address] => unlocked [field_lock_city] => locked [field_lock_country] => locked [field_lock_department] => unlocked [field_lock_description] => unlocked [field_lock_email] => locked [field_lock_firstname] => locked [field_lock_idnumber] => unlocked [field_lock_institution] => unlocked [field_lock_lang] => unlocked [field_lock_lastname] => locked [field_lock_phone1] => unlocked [field_lock_phone2] => unlocked [field_lock_url] => unlocked [hostname] => https://www.starr.org [host_uri] => https://starr.org/ [path_to_sso] => /starr_sso [remote_pw] => sB923wMxgE9vkbx [remote_user] => remote_4860 [removeuser] => 0 [version] => 2017071103 )
line 80 of /auth/drupalservices/settings.php: call to debugging()
line 85 of /lib/classes/plugininfo/auth.php: call to include()
line 133 of /admin/settings/plugins.php: call to core\plugininfo\auth->load_settings()
line 8004 of /lib/adminlib.php: call to require()
line 19 of /admin/settings.php: call to admin_get_root()
Using preconfigured values: stdClass Object ( [cohorts] => 0 [cohort_view] => [cookiedomain] => [endpoint] => /drupalservice [field_lock_address] => unlocked [field_lock_city] => locked [field_lock_country] => locked [field_lock_department] => unlocked [field_lock_description] => unlocked [field_lock_email] => locked [field_lock_firstname] => locked [field_lock_idnumber] => unlocked [field_lock_institution] => unlocked [field_lock_lang] => unlocked [field_lock_lastname] => locked [field_lock_phone1] => unlocked [field_lock_phone2] => unlocked [field_lock_url] => unlocked [hostname] => https://www.starr.org [host_uri] => https://starr.org/ [path_to_sso] => /starr_sso [remote_pw] => sB923wMxgE9vkbx [remote_user] => remote_4860 [removeuser] => 0 [version] => 2017071103 )
line 80 of /auth/drupalservices/settings.php: call to debugging()
line 85 of /lib/classes/plugininfo/auth.php: call to include()
line 133 of /admin/settings/plugins.php: call to core\plugininfo\auth->load_settings()
line 8004 of /lib/adminlib.php: call to require()
line 8106 of /lib/adminlib.php: call to admin_get_root()
line 42 of /admin/settings.php: call to admin_write_settings()

My drupal site is at https://starr.og and my Moodle site is at http://tlcinstituteonline.org/courses

I spent the last two days trying to get this to work and have not had any luck. ANY help is most appreciated.

Thanks!

vittala23 commented 7 years ago

So, I noticed that the pligi was trying to reach "/moodlesso' and I had the end point set to something different so I changed it but now it looks like it is calling 'moodlesso' twice in the URL? I have been trying to get this working for two days straight and am getting no where... any help is appreciated.

Using preconfigured values: stdClass Object ( [cohorts] => 0 [cohort_view] => [endpoint] => /drupalservice [field_lock_address] => unlocked [field_lock_city] => locked [field_lock_country] => locked [field_lock_department] => unlocked [field_lock_description] => unlocked [field_lock_email] => locked [field_lock_firstname] => locked [field_lock_idnumber] => unlocked [field_lock_institution] => unlocked [field_lock_lang] => unlocked [field_lock_lastname] => locked [field_lock_phone1] => unlocked [field_lock_phone2] => unlocked [field_lock_url] => unlocked [hostname] => https://www.starr.org [host_uri] => https://starr.org [path_to_sso] => /starr_sso [remote_pw] => sB923wMxgE9vkbx [remote_user] => remote_4860 [removeuser] => 0 [version] => 2014123000 )
line 79 of /auth/drupalservices/settings.php: call to debugging()
line 85 of /lib/classes/plugininfo/auth.php: call to include()
line 133 of /admin/settings/plugins.php: call to core\plugininfo\auth->load_settings()
line 7999 of /lib/adminlib.php: call to require()
line 19 of /admin/settings.php: call to admin_get_root()
attempting to reach service url: https://starr.org/moodlesso/moodlesso
line 183 of /auth/drupalservices/REST-API.php: call to debugging()
line 296 of /auth/drupalservices/REST-API.php: call to RemoteAPI->CurlHttpRequest()
line 106 of /auth/drupalservices/settings.php: call to RemoteAPI->Settings()
line 85 of /lib/classes/plugininfo/auth.php: call to include()
line 133 of /admin/settings/plugins.php: call to core\plugininfo\auth->load_settings()
line 7999 of /lib/adminlib.php: call to require()
line 19 of /admin/settings.php: call to admin_get_root()
The moodlesso service is unreachable. Please verify that you have the Mooodle SSO drupal module installed and enabled: http://drupal.org/project/moodle_sso
line 121 of /auth/drupalservices/settings.php: call to debugging()
line 85 of /lib/classes/plugininfo/auth.php: call to include()
line 133 of /admin/settings/plugins.php: call to core\plugininfo\auth->load_settings()
line 7999 of /lib/adminlib.php: call to require()
line 19 of /admin/settings.php: call to admin_get_root()
Using preconfigured values: stdClass Object ( [cohorts] => 0 [cohort_view] => [endpoint] => /drupalservice [field_lock_address] => unlocked [field_lock_city] => locked [field_lock_country] => locked [field_lock_department] => unlocked [field_lock_description] => unlocked [field_lock_email] => locked [field_lock_firstname] => locked [field_lock_idnumber] => unlocked [field_lock_institution] => unlocked [field_lock_lang] => unlocked [field_lock_lastname] => locked [field_lock_phone1] => unlocked [field_lock_phone2] => unlocked [field_lock_url] => unlocked [hostname] => https://www.starr.org [host_uri] => https://starr.org [path_to_sso] => /starr_sso [remote_pw] => sB923wMxgE9vkbx [remote_user] => remote_4860 [removeuser] => 0 [version] => 2014123000 )
line 79 of /auth/drupalservices/settings.php: call to debugging()
line 85 of /lib/classes/plugininfo/auth.php: call to include()
line 133 of /admin/settings/plugins.php: call to core\plugininfo\auth->load_settings()
line 7999 of /lib/adminlib.php: call to require()
line 8101 of /lib/adminlib.php: call to admin_get_root()
line 42 of /admin/settings.php: call to admin_write_settings()
attempting to reach service url: https://starr.org/moodlesso/moodlesso
line 183 of /auth/drupalservices/REST-API.php: call to debugging()
line 296 of /auth/drupalservices/REST-API.php: call to RemoteAPI->CurlHttpRequest()
line 106 of /auth/drupalservices/settings.php: call to RemoteAPI->Settings()
line 85 of /lib/classes/plugininfo/auth.php: call to include()
line 133 of /admin/settings/plugins.php: call to core\plugininfo\auth->load_settings()
line 7999 of /lib/adminlib.php: call to require()
line 8101 of /lib/adminlib.php: call to admin_get_root()
line 42 of /admin/settings.php: call to admin_write_settings()
The moodlesso service is unreachable. Please verify that you have the Mooodle SSO drupal module installed and enabled: http://drupal.org/project/moodle_sso
line 121 of /auth/drupalservices/settings.php: call to debugging()
line 85 of /lib/classes/plugininfo/auth.php: call to include()
line 133 of /admin/settings/plugins.php: call to core\plugininfo\auth->load_settings()
line 7999 of /lib/adminlib.php: call to require()
line 8101 of /lib/adminlib.php: call to admin_get_root()
line 42 of /admin/settings.php: call to admin_write_settings()
tebyx commented 5 years ago

@vittala23 I'm not sure if you had any luck getting this to work, but I noticed the domains of drupal and moodle are not the same. The only way this integration will work is if they are both under the same domain (could be under a different floder o different subdomain), but a different domain will just not work as far as I'm aware...