After upgrade to OJS 3.2.1.2 - ORCID plugin producing fatal error

Hi @Dulip_Withanage,
After I upgraded to OJS 3.2.1.2, the ORCID plugin is throwing a fatal error at the time of Registering a user account.

See the screenshot below:
1

Following is the php error:

[20-Nov-2020 02:04:32 America/New_York] PHP Fatal error:  Uncaught Error: Call to undefined method Application::getHttpClient() in /home/seisense/journal.seisense.com/plugins/generic/orcidProfile/pages/OrcidHandler.inc.php:59

Stack trace:
#0 /home/seisense/journal.seisense.com/lib/pkp/classes/core/PKPRouter.inc.php(391): OrcidHandler->orcidAuthorize(Array, Object(Request))
#1 /home/seisense/journal.seisense.com/lib/pkp/classes/core/PKPPageRouter.inc.php(231): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false)
#2 /home/seisense/journal.seisense.com/lib/pkp/classes/core/Dispatcher.inc.php(143): PKPPageRouter->route(Object(Request))
#3 /home/seisense/journal.seisense.com/lib/pkp/classes/core/PKPApplication.inc.php(281): Dispatcher->dispatch(Object(Request))
#4 /home/seisense/journal.seisense.com/index.php(68): PKPApplication->execute()
#5 {main}
thrown in /home/seisense/journal.seisense.com/plugins/generic/orcidProfile/pages/OrcidHandler.inc.php on line 59

Thanks @seisense for the report.
I will look into your case, ASAP.

Hi @Dulip_Withanage, we have the same problem. I have mentioned it here Error message when using the ORCID Profile Plugin after updating to OJS 3.2.1.2

Hi @bibliothekswelt, @seisense
can you confirm me, which version of the plugin you are having ?
1.1.2.5 ?

@Dulip_Withanage
The latest version 1.1.2.5 is installed

We have also installed release 1.1.2.5 from 2020-08-16

Yesterday, I installed the latest release of ORCID 1.1.2.6 from the plugin area (it was showing update available).
It is throwing the following fatal error in PHP error log:

[06-Jan-2021 17:58:32 America/New_York] PHP Warning: assert(): assert($context != null) failed in /home/seisense/journal.seisense.com/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php on line 303
[06-Jan-2021 17:58:32 America/New_York] PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /home/seisense/journal.seisense.com/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php:304
Stack trace:
#0 /home/seisense/journal.seisense.com/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php(343): OrcidProfilePlugin->buildOAuthUrl(‘orcidAuthorize’, Array)
#1 /home/seisense/journal.seisense.com/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_filterhandler.php(63): OrcidProfilePlugin->registrationFilter(’\trunFilter(‘output’, '\trender(false, 1)
#4 /home/seisense/journal.seisense.com/lib/pkp/lib/ven in /home/seisense/journal.seisense.com/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php on line 304

Looking forward to your reply.
Thanks

Hi @seisense,

were you on a journal or myjournal.domain/index.php/index when the error occured?
In Plugin I am asserting that the context is set? Can you confirm it for me?

we have the same problem.

Hi @Dulip_Withanage ,
I don’t know exactly when this error is produced. I belive it is happening only when the author tries authenticate the ORCID by following the link they receive in email.
Thanks

@Dulip_Withanage when an instance supports multiple journals, it is possible to login/register from a site-wide form, when no context exists. Could this be the source of the problem?

Login to ojs admin panel,

  • navigate to settings->website->plugins

  • now click on tab plugin gallery

  • click on “ORCiD Profile”

  • Update plugin
    Issue will be resolved.

Regards,
kaleem ul hassan