From d163378c06db82915298dffd56727f1612ef8886 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 (cherry picked from commit bdde13a22d8ba18338bf346c221884a851fb24a8) --- plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php b/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php index 2c7ce2d78c8..ecea2032dab 100644 --- a/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php +++ b/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php @@ -216,7 +216,9 @@ public 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');