Hi @asmecher,
Thank you for taking the time to respond.
Here’s what I did to try provide more information:
-
Went to /plugins/generic/orcidProfile/pages/OrcidHandler.inc.php
and uncommented statement window.close()
by adding an asterisk *
at beginning of the corresponding [last line]:
case 'register':
echo '<html><body><script type="text/javascript">
opener.document.getElementById("firstName").value = ' . json_encode($json['name']['given-names']['value']) . ';
opener.document.getElementById("lastName").value = ' . json_encode($json['name']['family-name']['value']) . ';
opener.document.getElementById("email").value = ' . json_encode($json['email']['value']) . ';
opener.document.getElementById("orcid").value = ' . json_encode($orcid_uri). ';
opener.document.getElementById("connect-orcid-button").style.display = "none";
window.close();
-
Went to config.inc.php
and made the following configurations:
enable_minified = Off
display_errors = On
Here is are what I hope are the Javascript error messages my browser returns when pulling an “authorize” request in the Orcid connector pop up window:
Notice: Undefined variable: son in /home/web1238/public_html/OJS/plugins/generic/orcidProfile/pages/OrcidHandler.inc.php on line 78
Notice: Undefined variable: json in /home/web1238/public_html/OJS/plugins/generic/orcidProfile/pages/OrcidHandler.inc.php on line 79
Notice: Undefined variable: json in /home/web1238/public_html/OJS/plugins/generic/orcidProfile/pages/OrcidHandler.inc.php on line 80
That refers precisely to the fields that are returned as “null” from Orcid, https://github.com/pkp/orcidProfile/blob/master/pages/OrcidHandler.inc.php#L78-L80
78 opener.document.getElementById("firstName").value = ' . json_encode($json['name']['given-names']['value']) . ';
79 opener.document.getElementById("lastName").value = ' . json_encode($json['name']['family-name']['value']) . ';
80 opener.document.getElementById("email").value = ' . json_encode($json['email']['value']) . ';
I don’t know if this helps, but I did encounter something strange while retrieving these info.
Looking up the page source for the Orcid authorize pop up window, I can see that https://orcid.org/oauth/signin has line #47 stating:
orcidVar.searchBaseUrl = "https://pub.orcid.org/v1.2/search/orcid-bio/";
Should this not be v2.0 ???
Other things that might interfer:
a) in config.inc.php
, I have my base URL set to HTTP: base_url = "http://clararevue.ulb.be/OJS"
but the following settings in my .htaccess
file:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://clararevue.ulb.be/$1 [R,L]
RewriteRule ^$ /OJS/index.php/CLARA [R=301,L]
While in Orcid, I’ve set the Redirect URIs to match https://clararevue.ulb.be/
Could it be that these http/https settings are creating mismatches?
b) also, in config.inc.php
, I have restful_urls = Off
and uncommented Base URL override settings, while Orcid seems to rely on Restful URLs…
Thank you, that’s all I could think of.
Axel