ORCID Profile Plugin Generates Fatal Error on OJS

Latest version of Orcid Profile Plugin generates a Fatal Error on OJS
Some symptoms appear on article details page but I can’t diagnose them now.
I updated the plugin from the gallery.
Public API keys are entered and it was working on 3.1.4
Best Regards,

php error log shows that lines

[29-May-2020 19:58:59 Europe/Istanbul] PHP Warning:  assert(): assert($context != null) failed in /home/journals/public_html/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php on line 316
[29-May-2020 19:58:59 Europe/Istanbul] PHP Fatal error:  Uncaught Error: Call to a member function getId() on null in /home/journals/public_html/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php:317
Stack trace:
#0 /home/journals/public_html/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php(356): OrcidProfilePlugin->buildOAuthUrl('orcidAuthorize', Array)
#1 /home/journals/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_filterhandler.php(63): OrcidProfilePlugin->registrationFilter('<!DOCTYPE html>...', Object(Smarty_Internal_Template))
#2 /home/journals/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(231): Smarty_Internal_Runtime_FilterHandler->runFilter('output', '<!DOCTYPE html>...', Object(Smarty_Internal_Template))
#3 /home/journals/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render(false, 1)
#4 /home/journals/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templa in /home/journals/public_html/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php on line 317

Another sign of this fatal error may be the Public tab in user profile comes empty.

Hi @drugurkocak
have you enabled the orcid plugin for the journal you are trying to access, because the context of the request does not seem to be present? We except that the plugin has to be configured for each journal.
Just send me the version of the plugin, so I can check it locally.

For your user profile error. Can you please send me the error log .

1 Like

Hi @Dulip_Withanage
Thank you for your kind reply. I freshly installed OJS 3.2.0-3 via Github, and then upgraded my old journal system database by adjusting config.inc.php
Then, I installed ORCID plugin (etc) via Plugin gallery. Previous API settings existed in the plugin settings, so I didn’t reenter them.
I realized that, I took the screenshot from the Site Admin Profile since it is me. When I enter a journal’s background and look my user profile, I can see the full details and my ORCID iD. There are 3 journals now, but 2 of them have no articles, not active yet. So, I hadn’t activated the plugin for those journals. I activated the plugin for all journals and entered the same api keys for them. I also disabled the plugin in the Journal Gallery Control panel (Site Root).
I will delete the php-error log and watch if the same error continues to emerge. I think it will be better to share more then.
The journals are here: https://journals.akademisyen.net/
Best regards,

Hi @Dulip_Withanage
For the last 24 hours, I got no fatal errors related to the ORCID profile plugin, and it seems to run well. The plugin is the latest version for 3.2 in the gallery. Thank you very much for your kind support. Lastly, I would like to ask one more thing. Do I need to get a seperate API key and cliend id for each journal on an OJS installation? Either I couldn’t configure the ORCID API settings (redirects) in the ORCID developer page, or there might be such a rule, because I get some 404 error pages when I click the links in the emails related to ORCID iD. These are emails for author contribution to the articles to add their ORCID iDs.



Hi @drugurkocak,

Thank you for the feedback.

Do I need to get a seperate API key and cliend id for each journal on an OJS installation?

yes, you need to get api keys for each journal, if the domains are different.

But you can try to get a global api key e.g. if you have journals like this


Then if you get the key for abc.xy you should be able to use that for other journals too.

But I haven’t tried that scenari myself.

Hi @Dulip_Withanage
Thank you much for your kind reply.
Although It is a small journal network, yes it is a mixture of both.
I will adjust it accordingly,

I also have problems with the ORCID plugin. If I configure it for just one journal I get ‘Redirect URI doesn’t match your registered redirect URIs.’ I indicated the journal’s main page as redirect URI, as well as the registration page of the same journal, because this is where I was redirected to using the sandbox environment (it worked only because any URI was allowed and this is not possible for the productive environment).
I also tried to use ORCID globally and wrote all the necessary credentials in the config file as described here: Installation and Setup. But in this case I get the following message in the error log: “PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /app/ojs/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php:254”. Any ideas, @Dulip_Withanage ?
We use OJS 3.1.2. btw,

HI @varachkina,

Coud not reproduce this problem with OJS 3.1.2 with Plugin v 1.1.14

  • Just to confirm before digging into the problem. Do you have the latest version of the plugin v for OJS 3.1.2 ?
  • If you set the site-wide configuration, the plugin asserts , that you are in a journal context. Can you confirm me, that it was not the index.php/index?

Hi @Dulip_Withanage,

yes, other journals than index, cause index is not really a journal.

Regarding the operation:

ORCID is very strict on redirects.

Did you add the following address


or beter https://ojs.sub.uni-goettingen.de/index.php
when you were registering the member api by orcid ?

Hi @Dulip_Withanage ,
I added the URIs that you recommended, but the problem persists.
I registered the member API by ORCID last week.


Hi Hanna,

hmm, generally, if you are in a journal and the redirects are correct, it should work.

Can you send me the orcid.og file after enabling log ALL in the plugins settings in an email ?

orcid.log located under orcid file folder.

I would anyhow double chck with ORCID to confirm whether the URL redirect really works ?