Orcid profile error 500 after author sign-in

I have a problem with the Orcid profile plugin. After the author fills the pop-up window with their sign-in details, the site returns a 500 error page.

The URL in the window with the 500 error is “SITEROOT/index.php/JOURNAL/orcidapi/orcidAuthorize?targetOp=register&code=csQSgN”

I’m on OJS 3.2.0.3 and can’t upgrade OJS for the time being. PHP 7.2.x because switching to PHP 7.3 breaks the site.

The Orcid Module is the latest version v1_1_3-4 from Github.

Any ideas on how to debug this?

Thanks!

Hi @Jorge

What is the PHP fatal error causing the problem? It should be in your server logs.

Best
Jason

For some reason I’m not getting a PHP error in the logs, although there are error logs present. Should I enable extra reporting somewhere?

Hi again. I did find some errors in the log but not the more recent ones, which is puzzling. But I see a problem that has to do with a double slash. I see URLs like these https://pub.orcid.org/v2.1//person which do return a 500 error from the Orcid server. See:

[28-Sep-2022 09:42:42 Europe/Madrid] Unexpected ORCID API response: 500 (/home/ROOT-TO-OJS/plugins/generic/orcidProfile/pages/OrcidHandler.inc.php line 111, URL https://pub.orcid.org/v2.1//person)
[28-Sep-2022 09:42:42 Europe/Madrid] Unexpected ORCID API response: 500 (/home/ROOT-TO-OJS/plugins/generic/orcidProfile/pages/OrcidHandler.inc.php line 130, URL https://pub.orcid.org/v2.1//employments)

EDIT: these errors are from an older version of the plugin because I can see this in the plugin: “define(‘ORCID_API_VERSION_URL’, ‘v3.0/’);”

I’m going to try removing that trailing slash from v3.0 and see what happens.

The trailing slash wasn’t the problem. Any suggested settings for the PHP error to get logged?

Hi @Jorge ,

the latest version of the plugin is 1.1.2.26 for OJS 3.2.

Could you install it from the plugin gallery and let me know errors if there are any?

Apparently I can’t downgrade. I get this in the error_log:
ojs2: You are trying to downgrade the product “orcidProfile” from version [1.1.3.4] to version [1.1.2.3]. Downgrades are not supported.

So I put back 1.1.3.4. Is there any way to force the downgrade?

I also found that for some reason almost all php error logging was turned off, sorry for missing that!

I turned back on all error reporting and now at least I have the actual error:

[28-Oct-2022 12:49:39 Europe/Madrid] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/ROOT-TO-OJS/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 107
[28-Oct-2022 12:49:39 Europe/Madrid] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/ROOT-TO-OJS/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 129
[28-Oct-2022 12:49:39 Europe/Madrid] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/ROOT-TO-OJS/plugins/generic/publons/PublonsPlugin.inc.php on line 197
[28-Oct-2022 12:49:39 Europe/Madrid] PHP Fatal error:  Uncaught Error: Call to undefined method Application::getHttpClient() in /home/ROOT-TO-OJS/plugins/generic/orcidProfile/pages/OrcidHandler.inc.php:62
Stack trace:
#0 /home/ROOT-TO-OJS/lib/pkp/classes/core/PKPRouter.inc.php(391): OrcidHandler->orcidAuthorize(Array, Object(Request))
#1 /home/ROOT-TO-OJS/lib/pkp/classes/core/PKPPageRouter.inc.php(231): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false)
#2 /home/ROOT-TO-OJS/lib/pkp/classes/core/Dispatcher.inc.php(143): PKPPageRouter->route(Object(Request))
#3 /home/ROOT-TO-OJS/lib/pkp/classes/core/PKPApplication.inc.php(278): Dispatcher->dispatch(Object(Request))
#4 /home/ROOT-TO-OJS/index.php(68): PKPApplication->execute()
#5 {main}
  thrown in /home/ROOT-TO-OJS/plugins/generic/orcidProfile/pages/OrcidHandler.inc.php on line 62

I simply uploaded 1.1.2.3 via FTP and it seems to have downgraded fine.

However, the error is the same: Call to undefined method Application::getHttpClient()

Hello @Dulip_Withanage,

Any ideas what to try here?

Thanks!

If you are proficient with SQL, you could delete the corresponding record for the plugin in the versions table of your OJS database. Be sure to make a backup of the database before.

E.g.

select * from versions where product like "orcidProfile";

Then identify the version you want to delete and use the appropriate delete statement.
Then delete orcidProfile directory in your plugins/generic and do a reinstall of the corresponding plugin version.

Thanks @mpbraendle! This has allowed me to reinstall the plugin from the module gallery… and IT WORKS!!! I’ve been able to link the profile without errors.