From bd23b1a46198f5ad1fa40e5008354a9dc7e34aea Mon Sep 17 00:00:00 2001 From: Jonas Raoni Soares da Silva Date: Tue, 9 Jul 2024 16:27:43 +0300 Subject: [PATCH] pkp/pkp-lib#10174 Drop URL prefix from ORCID --- .../importexport/pubmed/filter/ArticlePubMedXmlFilter.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.inc.php b/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.inc.php index 051627d16a0..4473d4d74ab 100644 --- a/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.inc.php +++ b/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.inc.php @@ -205,7 +205,9 @@ function generateAuthorNode($doc, $journal, $issue, $submission, $author) { $authorElement->appendChild($doc->createElement('LastName'))->appendChild($doc->createTextNode(ucfirst($author->getLocalizedFamilyName()))); } $authorElement->appendChild($doc->createElement('Affiliation'))->appendChild($doc->createTextNode($author->getLocalizedAffiliation())); - $orcidId = $author->getData('orcid'); + // We're storing the ORCID with a URL (http://orcid.org/{$ID}), but the XML expects just the ID + $orcidId = explode('/', trim($author->getData('orcid') ?? '', '/')); + $orcidId = array_pop($orcidId); if ($orcidId) { $orcidNode = $authorElement->appendChild($doc->createElement('Identifier')); $orcidNode->setAttribute('Source', 'ORCID');