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.
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.
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()
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.