pkp / orcidProfile

A plugin to pull ORCID information into a PKP user profile
GNU General Public License v3.0
16 stars 50 forks source link

Fix retrieval of article DOI for transfer to author's ORCID record #275

Closed nils-stefan-weiher closed 1 year ago

nils-stefan-weiher commented 1 year ago

Hi everyone,

I found a bug in the stable branch for OJS 3.2.1. It was reported by Dr. Katrin Bemmann that the DOI was not transmitted to the ORCID record of the author but only the URL of the article for articles submitted in our journal hosting instance https://journals.ub.uni-heidelberg.de/

It seems in the changes for the 3.2.1 version a bug was introduced which changed how the the assigned DOI from the Publication object was retrieved (see commit for details).

With the change the DOI is again correctly added to the JSON object for external-ids and sent to the ORCID API.

Best regards,

Nils Stefan Weiher

nils-stefan-weiher commented 1 year ago

See also the parallel line for the 3.3.0 version, there the correct function was used to get the assigned DOI: https://github.com/pkp/orcidProfile/blob/stable-3_3_0/OrcidProfilePlugin.inc.php#L1345

withanage commented 1 year ago

Thanks @nils-stefan-weiher will review this

nils-stefan-weiher commented 1 year ago

I added one more commit concerning the OrcidHandler, while testing the ORCID author verification (in OJS 3.2.1) I received a fatal error from the OrcidHandler.

withanage commented 1 year ago

@nils-stefan-weiher everything looks good.

J_ust one comment, for 3.2.1 , didn't you want to load the pubid plugin

e.g. $pubIdPlugins = PluginRegistry::loadCategory('pubIds', true, $context->getId());

to read the DOI? If you confirm that, I will merge.

withanage commented 1 year ago

@nils-stefan-weiher checked, it is already there in L1113.

Everything is fine,I merged it. Will release a newer version in plugin gallery soon

withanage commented 1 year ago

@nils-stefan-weiher thanks again for the contributuion!