Code Monkey home page Code Monkey logo

orcidprofile's Introduction

Build Status

Table of Contents

ORCID Profile Plugin

NOTE: Please ensure you're using the correct branch. See the Releases area for packaged downloads. We recommend using the Plugin Gallery to install the plugin. For OJS 2.x, see the ojs-dev-2_4 branch.

Plugin for adding and verifying ORCID iD in PKP user profiles and author metadata.

Copyright © 2015-2019 University of Pittsburgh Copyright © 2014-2020 Simon Fraser University Copyright © 2003-2020 John Willinsky

Licensed under GPLv3. See LICENSE.txt for details.

User Documentation

Features:

  • Enable site-wide configuration of ORCID API settings using config.inc.php
  • Support ORCID API Version 2.1 (store only https ORCID Ids)
  • Allow journal managers to send e-mails requesting authors for ORCID authorization on submission or later.
  • Automated e-mail based authorization requests to authors when submission enters to production stage.
  • Display ORCID access status and expiration date in Author metadata
  • Support of template based detailed success/failure messages for ORCID authorization redirects.
  • Extra configurable (in plugin settings) ORCID log file in OJS_FILES_DIR/orcid.log for API communication. NOTE: Make sure that the files folder is not publicly accessible

Extra functionalities for ORCID Member organizations

  • Extra e-mail template ORCID_REQUEST_AUTHOR_AUTHORIZATION for requesting API access tokens.
  • Updated template text, e-mail templates for English and German locales.
  • Member API Email-Template activated upon selection of ORCID member API
  • Support for synchronizing submission meta data to authorized records in following stage changes:
    • Assign a submission to an already published issue
    • Publish a new issue
    • Author grants permission after the publication of the issue

Technical Workflow description

The included authorization link will have the access scope /activities/update. An author can authorize access to his/her ORCID record to allow the adding of the submission to the record. See https://members.orcid.org/api/oauth/orcid-scopes for more information.

Installation

Use the Plugin Gallery from within your PKP application to install the plugin. For further information refer to PKP|DOCS.

Debugging/Testing

Settings

  • Navigate to OJS Folder.
  • if a file called cypress.env.json does not exist, create one.
  • Add the following variables to the root JSON element, according to your server setting
"orcid": {
	"url": "https://sandbox.orcid.org",
	"apiPath": "https://api.sandbox.orcid.org",
 	"api Type": "Member Sandbox",
	"clientId": "APP-T0XXXXXXXXXXX",
	"clientSecret": "288455445-a3e4-454-9783-454545555",
	"email": "[email protected]",
	"emailPassword": "Password"
  },

Run all tests

Navigate to OJS folder

  • npx cypress run --config integrationFolder=plugins/generic/orcidProfile/cypress/tests/functional

Debug

  • Navigate to OJS Folder
  • Navigate to cypress folder
  • check logs and screenshots for errors

orcidprofile's People

Contributors

ajnyga avatar alexandrafo avatar alexxxmendonca avatar asmecher avatar bibliothekswelt avatar bozana avatar ckamburov avatar crism avatar ctgraham avatar defstat avatar diegojmacedo avatar jirrka avatar jonasraoni avatar jordilacruz avatar josekarvalho avatar luciasteele avatar mhvezina avatar mirkospiroski avatar mooselybased avatar mtub avatar natewr avatar neffe avatar osmndrmz avatar ppv1979 avatar primoz-svetek avatar tigran54 avatar touhidurabir avatar vitaliy-1 avatar vormia avatar withanage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

orcidprofile's Issues

ORCIDs are saved into database as whole URI.

[EDIT: Since this was filed the ORCID display guidelines have changed. Per https://github.com/pkp/pkp-lib/issues/2059#issuecomment-462177342, a good resolution would be to add an upgrade script that converts existing http ORCID URLs to https. -AS]

Currently ORCIDs are asked to be written with whole URI (http://orcid.org/****-****-****-****) and saved as such into database.

orcid.org allows using https so the better way to display links to ORCIDs would be: 'https://orcid.org/****-****-****-****'.

I could remove that prefix and substitute it with the https version, but the bigger problem is that OJS is saving ORCIDs as URIs in database: Preferred showing conventions can change as happened with DOIs recently.

So I would propose changing it so that only the identification part of ORCIDs would be saved to database. This is annoying change as migration scripts should take it to account and edit rows in the database.

Add pre-publication check to prevent publishing unauthenticated ORCID ids

Is your feature request related to a problem? Please describe.
When an ORCID has been provided for an author, that ORCID should be authenticated. Editors may accidentally publish a submission without checking that all provided ORCID ids have been authenticated.

Describe the solution you'd like
v3.2 provides support for pre-publication checks. It would be nice if the plugin had an option to enforce authenticated IDs in the plugin settings. When checked, a submission would use a pre-publication check to prevent a publication from being published if an ORCID id has been added but not authenticated.

ORCID Plugin: Missing description in howAndWhy

Describe the bug
Hi PKP Team,

It looks like the ORCID Profile Plugin is missing some text in the locale file, specifically in this entry:

<message key="plugins.generic.orcidProfile.about.howAndWhy"><![CDATA[This journal is collecting your ORCID iD so we can [add purpose and distinguish between Member API and Public API]. When you click the “Authorize” button in the ORCID popup, we will ask you to share your iD using an authenticated process: either by <a href="https://support.orcid.org/hc/en-us/articles/360006897454">registering for an ORCID iD</a> or, if you already have one, <a href="https://support.orcid.org/hc/en-us/categories/360000661673">to sign into your ORCID account</a>, then granting us permission to get your ORCID iD. We do this to ensure that you are correctly identified and securely connecting your ORCID iD.<br>Learn more in <a href="https://orcid.org/blog/2017/02/20/whats-so-special-about-signing">What’s so special about signing in.</a>]]></message>

This text also doesn't appear to be editable anywhere in the settings. It's probably a separate bug, but we weren't able to edit it in the Translator plugin either.

To Reproduce

This is visible in locale.xml, and can be seen in the UI under the orcid about page, e.g. https://myjournal.ca/index.php/journalname/orcidapi/about

What application are you using?
OJS 3.1.2.1, last upgraded June 13, 2019

Additional information

Screen Shot 2019-08-21 at 9 55 56 AM

Writing tests to test the orcid API and the user interface.

Issue

  • Manual testing of Orcid functions is resource intensive (E-mail send, E-mail verification through malinator, publishing article, checking pushed orcid record)

Describe the solution you'd like

  • Automation of the above tasks

Notes

How to resolve cross-domain errors in cypress

  • Cypress version 9.6+

  • cypress.config.js

    • experimentalSessionAndOrigin : true, "chromeWebSecurity": false
  • Tested with Chome v103, Electron v102

  • Example test scrpit

describe('Multi-Domain Demo', function () {

    const getIframeBodyById = (id) => {
        return cy.get('iframe[id="' + id + '"]')
            .its('0.contentDocument.body').should('not.be.empty')
            .then(cy.wrap)
    }

    it('Verify Orcid User by Email', function () {
        const publicMailBox = 'https://mailinator.com/v4/public/inboxes.jsp?to=coauthor';
        cy.visit(publicMailBox)
        // open  the latest email
        cy.get('.os-content > .table-striped > tbody > .ng-scope > .ng-binding:nth-child(3)')
            .first()
            .should('be.visible')
            .click()
        // get email  from the iframe
        getIframeBodyById('html_msg_body')
            .contains('Register or Connect your ORCID iD').should('have.attr', 'href')
            .then((href) => {
                // cross domain request
                cy.origin('https://sandbox.orcid.org', {args: {href}}, ({href}) => {
                    cy.visit('/signin')
                    cy.wait(10)
                    cy.get('[id=username]').type("[email protected]")
                    cy.get('[id=password]').type("c")
                    cy.get('[id=signin-button]').click()
                    cy.wait(10)
                    cy.visit(href)
               })
            })
    })
})
orcid_cypress.mp4

Broken link to orcid id icon on What is ORCID? info page

The link to the Orcid ID icon on the What is ORCID? page (the front-end page created by the plugin) appears to be broken. I have verified this on two different instances of OJS:

https://refuge.journals.yorku.ca/index.php/refuge/orcidapi/about
https://witness.journals.yorku.ca/index.php/default/orcidapi/about

The broken image link is https://orcid.org/sites/default/files/images/orcid_16x16(1).gif

Both sites running OJS 3.3.0.13, ORCID Profile plugin 1.1.3.4

Reviewer Credits

Review functionality

Orcid_Peer_Review.mp4

Reviewer Anonymity metadata transfer concept

Information Orcid Field Anonymous Open
1. Date of submission created-date YYYY YYYY-MM-DD
2. Date of acceptance (review) review-completion-date YYYY YYYY-MM-DD
3. Date of publication created-date YYYY YYYY-MM-DD
7. Article URL review-url ✔️

Review Functionalitry

Plugin Settings

Orcid_Settings.mp4

Links

Orcid Review display

Reviewer-Info

  • In user profiles, peer-review will be visible only when the user has enabled it. ref

Specification (from ORCID)

a. Information about the reviewer
  1. Role (required): The individual’s role in the review process, e.g. chair, editor, member, organizer, reviewer 🆗

  2. Identifier (required): The reviewer’s ORCID iD
    full orcid URL including https 🆗

b. Information about the organizer
  • Convening organization (required): This describes the organization which organized the review - a journal publisher, conference organizer, funding agency, faculty, etc.
  1. We can use the Publisher name under Settings- > Journal -> masterhead -> publisher ❓

Location

  1. City (required): The city where the organizer is based
  • Region: The region where the organizer is based
  • Country (required): The country where the organizer is based

If I am correct, the only location where the journal address is default maintained is under principal contact. There also we have the mailing address. This can be a little tricky to parse, if the journal managers do not provide it correctly. Country is straight-forward, but the city can be not easy to find.

Another possibility is to get the location from the issn. Haven't explored it whether they have an API or does it make sense ?
e.g. https://portal.issn.org/resource/ISSN/0006-1387

  1. Identifier (required): The persistent identifier for the organization

ISSN of the journal or ROR id of the press / hosting organization ❓

c. Information about the review
  1. Group (required): An identifier used to group together the reviews on the ORCID record; it describes the group of which the review is part. This could be the name of a journal (Journal of Scientific Investigations) or an organization (Scholarly Publisher, State University)

User -> affiliation ❓

  1. Type (required): The type of review activity, e.g., a review, evaluation

Review 🆗

  1. Date (required): When the review was completed. This can be broad (2008) or specific

Reveiw data 🆗

  1. Review container name: The name of main object of which the review is part, e.g. journal, conference, grant review panel, etc.

journal name 🆗

  1. Review identifier (required): A unique resolvable identifier provided by the source for the review itself. This is used to prevent duplication of review activity. Reviews can have more than one identifier, and multiple reviews with the same identifier will group together

Do we have a reviewer URL for the front-end through a plugin may be ❓

References:

This plugin sends reviewer id, submission-id,data and (due and submission) to reveiwercredits.com

https://www.reviewercredits.com/integrations-for-journals-and-manuscript-platforms/

Related to 10

11, Review URL: A link to the representation of the review online

d. Information about the review subject
  • Review subject name: The title of the item reviewed
  • Review subject type: The type of item that was reviewed, e.g. article, grant, monograph
  • Review subject identifier: A unique resolvable identifier for the reviewed item, e.g. a DOI
  • Review subject URL: A link to the reviewed item online

OJS supports all 🆗

References

TODO
  • Check the review round
  • Check visibility
  • Sending emails
  • Update with put code
  • Deleting submission
  • Country codes as plugin settings
  • [ ]

Related tickets

Add support for editing the Orcid after publication

Problem

The invitation-based ORCID process doesn't work well for preprints because it might just be a matter of a day or less before the content is posted. The chances that authors will respond to the ORCID invite within that time are small.

Possible solution

Permit ORCID invites to be used after publication happens

Orcid https in ojs-stable-2_4_8

Hi,
is it possible to include this commit in pkp-lib into ojs-stable-2_4_8 branch of OJS? I would have made pull request, but I do not know how to deal with sumodule versions.
Best,
Paflov

ORCID Plugin enhancements for OJS 3.1.2 and beyond

Following issues and enhancement requests are related, currently being developed or in discussion for the OJS 3.1.2 and 3.2 + support.

Description Issue Status area
Issue publish pkp/pkp-lib#5572 🆗 Issue
Sandbox iDs pkp/pkp-lib#4893 🆗 Issue
datacite export pkp/pkp-lib#4903 🚧 Issue
Empty URI after failed auth #113 🚧 Issue
icon problem https://forum.pkp.sfu.ca/t/orcid-icon-problem/53637 🚧 Forum
icon problem https://forum.pkp.sfu.ca/t/ojs-3-1-2-1-orcid-icon-doesnt-show/54613 🚧 Forum
Option for emails #112 🚧 Issue

ORCID plugin should not function without credentials entered

Is your feature request related to a problem? Please describe.
Here is the most common scenario and a source of 99% of ORCID-related tickets filed with PKP|PS:

  • A JM/JE enables the plugin without obtaining/entering credentials
  • Authors start receiving ORCID emails with sandbox URL which does not work
  • JM/JE report this as a tech issue with the plugin
  • Following the explanation & instructions on plugin setup most give up on it altogether

Unfortunately I find that this initial experience sours the first impression and turns people away from using the plugin.

Describe the solution you'd like
The bottom line is that the plugin should not be performing any of its functionality (particularly not direct author interactions) without being set up first. This follows the logic of #161

Some ideas for implementation:

  • an additional checkbox within the plugin settings that will not become active until credentials are entered and validated
  • a pop up when enabling the plugin that alerts the JM/JE that it needs to be set up + link to the ORCID guide
  • disable the plugin unless credentials are entered

[OPS] Email tag {$authorOrcidUrl} returns invalid URL when used as a link

Describe the bug
The tag {$authorOrcidUrl} generated a dynamic link that enables authors to connect their ORCID iD via the API. In order to make a more user-friendly link, instead of using the tag itself, the template suggests to add it to a link (ie: within an a href).

However, the platform is automatically adding a ../management/settings/ before the {$authorOrcidUrl} tag, which invalidates the URL.

To Reproduce
Steps to reproduce the behavior:

  1. Check your ORCID email templates
  2. Check the link to connect ORCID ID (usually the one followed by the ORCID icon)
  3. See how it points to ../management/settings/{$authorOrcidUrl}, which is not a valid URL

What application are you using?
Open Preprint Systems 3.2.0.1

Additional information
Workflow Settings

Authenticated ORCIDs may display double icon

Describe the bug
Originally filed at pkp/classic#82. If an author authenticates their ORCID iD against a submission, the ORCID iD icon should display next to their name. But in this case, it will display twice.

To Reproduce
Steps to reproduce the behavior:

Enable ORCID plugin
ask an author to authenticate their ORCID iD
publish the article

Screenshots
image

Solution
The problem is that the plugin displays an SVG icon, and also renders the icon in JS. The SVG icon can be repressed in themes, but it looks like the JS is added via this plugin (see templates/authorOrcidForm.tpl, lines 28-47 I think?). My original proposed solution was to remove the SVG file, but @NateWr suggests otherwise. I think that the solution would be to amend or remove the JS I point to above, but I'm not 100% sure.

[OJS] orcidProfile writes empty URI after failed auth

Hello

I recently encountered a problem with the orcidProfile plugin. After sending an authentication request email to an author without an account in the system, I found that their metadata had an empty orcid.org URI. They said that they were able to log into their account to authenticate their orcid, but got an error message saying the link had expired. From my orcid.log:

2019-06-30 21:19:15.240 INFO Request body: grant_type=authorization_code&client_id=APP-XXXXXX&client_secret=XXXXXXXXXXXXXXX
2019-06-30 21:19:16.240 INFO Response body: {"error":"server_error","error_description":"An authorization code must be supplied."}
2019-06-30 21:19:16.240 ERROR Response status: 500 . Invalid ORCID response: {"error":"server_error","error_description":"An authorization code must be supplied."}
2019-06-30 21:19:41.202 ERROR OrcidHandler::orcidverify - No author found with supplied token
2019-06-30 21:20:39.056 ERROR OrcidHandler::orcidverify - No author found with supplied token
2019-07-01 10:07:50.536 INFO POST https://pub.orcid.org/oauth/token
2019-07-01 10:07:50.538 INFO Request header: array (
0 => 'Accept: application/json',

Once this happened, I couldn't remove the bad orcid data without disabling the orcid plugin because I would get an error message saying the orcid was invalid and needed to be corrected. However, disabling the orcid plugin allowed me to delete the orcid on the article's metadata.

I am using OJS 3.1.2.1 and orcidProfile v 1.1.1.1.

Thanks for your help

failing upgrade to 3_3_0-8

Upgrading OJS from 3_3_0-7 to 3_3_0-8 I get this error

www-data@portatil108:~$ php /home/isaac.marco/git/ojs33/tools/upgrade.php upgrade
PHP Parse error:  syntax error, unexpected 'int' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /home/isaac.marco/git/ojs33/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php on line 40

plugin is deployed with git.

git submodule update --init --recursive

was done.

I'm in tag tag: v1_1_2-21, tag: 3_3_0-8

Add documentation on how to remove an ORCID iD that had been previously connected to an OJS author profile.

I had a really hard time finding documentation for how to remove an ORCID iD once one has already been connected to an author profile in OJS. (in my case, I was helping someone who had connected a sandbox ORCID iD to their actual OJS profile in order to test the plugin) I put together a tutorial with screenshots, please feel free to incorporate this into existing documentation: https://docs.google.com/document/d/1F9j6W3h8SFwaJ4D4RR1q4VK8rlLZ0Y4JxJNg75wc6p0/edit?usp=sharing

Pushing peer review information into researcher's ORCID record

Is your feature request related to a problem? Please describe.
ORCID Members that are using Member's API have the possibility to adding peer review information into a researcher's ORCID record when they performed a review for a given journal that is an ORCID member.

However, currently the ORCID plugin for OJS/OPS doesn't allow that.

Describe the solution you'd like
Allow journals and preprint servers that are ORCID members to "push" peer review information into researcher's ORCID record following these instructions:

https://members.orcid.org/api/workflow/peer-review

PHP Fatal error: Uncaught Error: Call to a member function getId() on null

Describe the bug
At the site-wide level when public profile tab is clicked, nothing happens and in the error_log an error appears. There is no message at the front-end that this function will work only within a journal context and not site-wide.

To Reproduce
Steps to reproduce the behavior:

  1. login as administrator
  2. Go to 'edit profile' under user context
  3. Click on 'public' tab under profile section
  4. nothing happens / it does not open public tab
  5. See error in the error_log file and no error / feedback on the front-end

Expected behavior
Feedback to the user regarding the context issue or the tab should open with out ORCID button and with a clear message that ORCID is available only within the context of a journal and not site-wide.

Screenshots
not required

Desktop (please complete the following information):

  • OS: windows 10
  • MS Edge
  • OJS version 3.3.0.13
  • PHP version 8.0

hope this gets fixed soon.

400 Bad request: invalid JSON

Hi !
I´m using ORCID membership, everything works fine, authorization, permissions etc. Only when an article is published, the plugin does not push orcid register and log file shows the following:

ERROR Unexpected status 400 response, body: {"response-code":400,"developer-message":"400 Bad request: invalid JSON - cvc-pattern-valid: Value '' is not facet-valid with respect to pattern '[\s\S][^\\s\\n\\r]+[\s\S]' for type '#AnonType_translated-title'.","user-message":"Invalid JSON.","error-code":9047,"more-info":"https://members.orcid.org/api/resources/troubleshooting"}

OJS 3.2.0.3
PHP 7.3
Debian 9

"Deny" workflow during OAuth process

Currently, when a user goes to connect their ORCID iD to OJS, if the user clicks "deny" as opposed to "authorize" on the ORCID OAuth screen, the user is just re-directed back to the same page they were on previously and the option to "create or connect ORCID iD" disappears unless the user refreshes the page.

The best practice, upon a user clicking "deny" during the OAuth process, is to display a message indicating that the ORCID iD was not connected and prompt the user to connect and authorize again. If we could update that deny workflow it would improve the plugin. Thanks!

OJS "thank reviewer" process frozen with public API.

Describe the bug
Using Public API on OJS3.3.x, at the moment of "thank reviewer", the OJS it stays cycled and does not respond.
When reviewing the error LOG, there are connection errors (error 500) to the ORCID API trying to push the reviewer's record. Which shouldn't be since the public API doesn't do record pushing, just members.

To Reproduce
Steps to reproduce the behavior:
Go to a round of review, and with a review done, click on thank reviewer.
The reviewer must have validated your ORCID initially.

Expected behavior
When clicking on "thank reviewer", a window should appear where OJS sends a message to the reviewer.

Additional context
This error only appears with OJS using the public API plugin.
With the member API I have had no problems.

The only solution at the moment is to unlink the ORCID from the reviewer and now to proceed normally.

orcidProfile plugin option for email is unimplemented

Describe the bug
The orcidProfile plugin settings form offers an option "Send e-mail to request ORCID authorization from article authors on publication of a new issue", but this setting is not referenced anywhere in the code, so mail is always sent on publication.

Reported: https://forum.pkp.sfu.ca/t/ojs-3-1-2-1-orcid-collect-letters-cannot-be-disabled/55206

To Reproduce
Steps to reproduce the behavior:

  1. Go to orcidProfile plugin settings
  2. Check "Send e-mail to request ORCID authorization from article authors on publication of a new issue" and save settings
  3. Publish an issue with incomplete ORCID information for authors
  4. Mail will be sent regardless of the setting

What application are you using?
OJS or OMP version 3.1.2

Additional information

{fbvFormSection for="sendMailToAuthorOnPublication" title="plugins.generic.orcidProfile.manager.settings.mailSectionTitle" list="true"}
{fbvElement type="checkbox" name="sendMailToAuthorsOnPublication" label="plugins.generic.orcidProfile.manager.settings.sendMailToAuthorsOnPublication" id="sendMailToAuthorsOnPublication" checked=$sendMailToAuthorsOnPublication}
{/fbvFormSection}

vs.

/**
* handleEditorAction handles promoting a submission to production.
*
* @param $hookName string Name the hook was registered with
* @param $args array Hook arguments, &$submission, &$editorDecision, &$result, &$recommendation.
*
* @see EditorAction::recordDecision() The function calling the hook.
*/
public function handleEditorAction($hookName, $args) {
$submission =& $args[0];
$authorDao = DAORegistry::getDAO('AuthorDAO');
$authors = $authorDao->getBySubmissionId($submission->getId());
foreach ($authors as $author) {
$orcidAccessExpiresOn = Carbon\Carbon::parse($author->getData('orcidAccessExpiresOn'));
if ( $author->getData('orcidAccessToken') == null || $orcidAccessExpiresOn->isPast()) {
$this->sendAuthorMail($author, true);
}
}
}

Unable to complete submission due to failed attempt to convert LazyCollection into array

Describe the bug
New Submission can not be completed or proceed to next step because of a failed attempt to convert a LazyCollection into an array . This cause to halt the proceeding to next step and those Fatal Error

To Reproduce
Steps to reproduce the behavior:

  1. Login as Author
  2. Create a new submission
  3. Proceed to the step 3 that is Enter Metadata stage.
  4. Fill up the required details and click on Save and Continue.
  5. See that the loading does not go away and neither can be proceed to next step which indicate an inter exception/error.

Screenshots
CleanShot 2022-10-23 at 21 01 35

Additional context

The cause of the issue lies at https://github.com/pkp/orcidProfile/blob/main/OrcidProfilePlugin.inc.php#L543-L553 as the $authors is a LazyCollection which can not be directly used or converted into an array .

The following error trace is getting registered to the system/php log

PHP Fatal error:  Uncaught Error: Cannot use object of type Illuminate\Support\LazyCollection as array in /Users/abir/Sites/code/ojs-main/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php:543
Stack trace:
#0 [internal function]: OrcidProfilePlugin->handleSubmissionSubmitStep3FormExecute('submissionsubmi...', Array)
#1 /Users/abir/Sites/code/ojs-main/lib/pkp/classes/plugins/Hook.php(139): call_user_func_array(Array, Array)
#2 /Users/abir/Sites/code/ojs-main/lib/pkp/classes/plugins/Hook.php(112): PKP\plugins\Hook::run('submissionsubmi...', Array)
#3 /Users/abir/Sites/code/ojs-main/lib/pkp/classes/form/Form.php(337): PKP\plugins\Hook::call('submissionsubmi...', Array)
#4 /Users/abir/Sites/code/ojs-main/lib/pkp/classes/submission/form/PKPSubmissionSubmitStep3Form.php(130): PKP\form\Form->execute()
#5 /Users/abir/Sites/code/ojs-main/lib/pkp/pages/submission/PKPSubmissionHandler.php(199): PKP\submission\form\PKPSubmissionSubmitStep3Form->execute()
#6 [internal function]: PKP\pages\submission\PKPSubmissionHandler->saveStep(Array, Object(APP\core\Request))
#7 /Users/abir/Sites/code/ojs-main/lib/pkp/classes/core/PKPRouter.php(465): call_user_func(Array, Array, Object(APP\core\Request))
#8 /Users/abir/Sites/code/ojs-main/lib/pkp/classes/core/PKPPageRouter.php(308): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array, false)
#9 /Users/abir/Sites/code/ojs-main/lib/pkp/classes/core/Dispatcher.php(163): PKP\core\PKPPageRouter->route(Object(APP\core\Request))
#10 /Users/abir/Sites/code/ojs-main/lib/pkp/classes/core/PKPApplication.php(379): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#11 /Users/abir/Sites/code/ojs-main/index.php(21): PKP\core\PKPApplication->execute()
#12 /Users/abir/.composer/vendor/laravel/valet/server.php(234): require('/Users/abir/Sit...')
#13 {main}
  thrown in /Users/abir/Sites/code/ojs-main/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php on line 543

Orcid code string validation error

Orcid id String validation error in code

if ($response->getStatusCode() == 200 && strlen($responseJson['orcid'] > 0)) {

Should be

if ($response->getStatusCode() == 200 && strlen($responseJson['orcid']) > 0) {
		

Website context login generates fatal error when orcidProfile is enabled

Describe the bug
Website context login generates fatal error when orcidProfile is enabled

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://localhost/ojs/index.php/index/user/register
  2. See error

Expected behavior
Oricd Authentication must be avaliable for only journals

Screenshots

[Sun Jul 10 00:10:59.503657 2022] [php7:notice] [pid 10230] [client ::1:38480] PHP Fatal error:  Uncaught Error: Call to a member function getId() on null in /var/www/html/ojs/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php:339\nStack trace:\n#0 /var/www/html/ojs/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php(297): OrcidProfilePlugin->buildOAuthUrl()\n#1 /var/www/html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_filterhandler.php(63): OrcidProfilePlugin->registrationFilter()\n#2 /var/www/html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(231): Smarty_Internal_Runtime_FilterHandler->runFilter()\n#3 /var/www/html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render()\n#4 /var/www/html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(134): Smarty_Internal_TemplateBase->_execute()\n#5 /var/www/html/ojs/lib/pkp/classes/template/PKPTemplateManager.inc.php(924): Smarty_Internal_TemplateBase->display()\n#6 /var/www/html/ojs/lib/p in /var/www/html/ojs/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php on line 339

Desktop (please complete the following information):

  • OS: any
  • Browser chrome, safari

Additional context

Update text in email that is sent to authors asking them to connect their ORCID iD with OJS

We have received feedback from journal editors asking to update the email text in the email that gets sent to authors asking them to connect their ORCID iD with a journal - the goal is to make the email text more clear to indicate exactly who is asking for permission to get their ORCID iD and write the work to ORCID.

Currently the email says: "Please allow us to add your ORCID id to this submission and also to add the submission to your ORCID profile on publication. Visit the link to the official ORCID website, login with your profile and authorize the access by following the instructions."

We suggest that the email text be edited to say: "You can connect your ORCID iD to this journal submission by logging into your ORCID Record and authenticating the connection here: Connect your ORCID iD. As you go through this process, [Application Name] will also request your permission to be able to add and update information about this article in your ORCID Record should it be published."

Additional notes:

  • Kate can review as part of her email template review project.
  • Important to be clear as to who the user is giving permission to.
  • “Application Name” would be the journal or the institution, depending on who the ORCID member is. It might be hard to insert the “Application Name” into the email but could be useful to define it in the plugin/OJS.

Linking profile to orcid gives errorlog and blank page

Describe the bug
Last week we updated our OJS journals and their plugins to the latest version (ojs 3.3.0-14 and orcidprofile 1.1.3.4)
the orcidprofile plugin was already up-to-date and worked fine until the update.
Now when linking an orcid profile, the users get a white page after trying to link and logging into orcid.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'profile->public'
  2. click on link profile
  3. log into orcid
  4. get white page

Expected behavior
user gets e-mail with link to confirm the action

Desktop (please complete the following information):

  • OS: Ubuntu 20.04 / Windows 10
  • Browser: Firefox
  • Version: 88.0

Additional context

apache error log:

PHP Fatal error:  Uncaught TypeError: Carbon\\Carbon::setLastErrors(): Argument #1 ($lastErrors) must be of type array, bool given, called in /path/to/ojs/lib/pkp/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 96 and defined in /path/to/ojs/lib/pkp/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:897
Stack trace:
#0 /path/to/ojs/lib/pkp/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php(96): Carbon\\Carbon::setLastErrors()
#1 /path/to/ojs/lib/pkp/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php(250): Carbon\\Carbon->__construct()
#2 /path/to/ojs/plugins/generic/orcidProfile/pages/OrcidHandler.inc.php(159): Carbon\\Carbon::now()
#3 /path/to/ojs/plugins/generic/orcidProfile/pages/OrcidHandler.inc.php(139): OrcidHandler->_setOrcidData()
#4 /path/to/ojs/lib/pkp/classes/core/PKPRouter.inc.php(395): OrcidHandler->orcidAuthorize()
#5 /path/to/ojs/lib/pkp/classes/core/PKPPageRouter.inc.php(246): PKPRouter->_authorizeInitializeAndCallRequest()
#6 /path/to/ojs/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPPageRouter->route()
#7 /path/to/ojs/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch()
#8 /path/to/ojs/index.php(68): PKPApplication->execute()
#9 {main}
  thrown in /path/to/ojs/lib/pkp/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 897, referer: https://orcid.org/

Thank you for your help
Jannik

Update the about page in the plugin to reflect the current status

Is your feature request related to a problem?

Some information on about page is outdated, and some of the links on the page are broken, but the info can only be updated using the Custom Locale Plugin

Describe the solution you'd like

  • Fixing a typo / misspelling on the word "connecting" (should be connected)
  • Updating the link to this article
  • Adding the iD icon in the second-to-last sentence.

Shoud be done for OJS 3.2.1 as well

Describe alternatives you've considered

  • Disabling the about page in the plugin

Additional context

image

[OPS] Authors can't associate ORCID ID after preprint is posted

Describe the bug
After a preprint is posted, authors are unable to associate their ORCID ID to the metadata.

They see the following message after they click on the deeplink sent by e-mail:

image

To Reproduce
Steps to reproduce the behavior:

  1. Submit a preprint.
  2. Add co-authors; do not associate co-authors' ORCID IDs
  3. As a moderator, send the ORCID ID request e-mail to co-authors
  4. Post preprint.
  5. As the co-author, attempt to associate your ORCID ID by clicking on the deeplink sent on e-mail of step 3.
  6. See error.

What application are you using?
Open Preprint Systems 3.2.0.1

Additional information
Preprints have a very fast workflow. They get either rejected or approved often within 24 hours. Often times, between screening and actual posting of preprint, there is not enough time for all co-authors to associate their ORCID IDs. The platform should still allow ORCID association after-posting. The deeplinks should still be valid.

On that note, it would be good if, as a Moderator, I could re-send the ORCID validation email for a given posted preprint. After you post a preprint, the moderator can no longer send this e-mail. Sometimes the author miss the email. It would be nice to be able to send it again (I'm happy to open a new issue of that's the case).

ORCID - JM doesn't fill in setting parameter fields

Describe the problem you would like to solve
Some plugins require that information setting be provided. It is pretty common that editors enable the plugin and didn't provide any kind of setting parameter because they are not aware it should be done. And they don't know how to get it as well.

Describe the solution you'd like
Show the modal plugin settings when it is enabled from the dashboard. It could be applied for any other plugin which requires an extra layer of information settings to work rather than only enable it from the plugin gallery.

Who is asking for this feature?
It can benefit JM that usually enable plugins and don't provide the settings. They ask for support to make the ORCID work, for example.

Additional information
It can be a useful feature for Hosting and Community. In only one week 4-5 different JM asked the same question: "Why this plugin is not working if I've already enabled it?"

Plugin writes an empty https://[sandbox].orcid.org by failed communication

Describe the bug

Plugin writes an empty https://[sandbox].orcid.org by failed communication

To Reproduce
Difficult scenario to recreate on API status, network or other third party or unkown factors.

Expected behavior

  • Clear and consise message, what has happened
  • Do not write the orcid url without the id into the database

OPS does not push author works to the orcid API

Describe the bug
In some installations , the data does not seem to be published into orcid. Scielo has an example server.

Additional context

  • PHP 7.3.33
  • OPS 3.3.0.10
  • ORCID Profile Plugin 1.1.3.4

[OJS] orcidProfile Plugin: ORCID integration in User Register form broken

Hi everyone and especially @Vitaliy-1 ,

@asmecher send an error message via teampkp Slack and I found out, that in 3.1.2 the orcidProfile Plugin integration with the User Registration form is completely broken.

  • Pre-fill of the form fields is not working because of the name changes, see OrcidHandler.inc.php#L137-L138 (Fixed: 54bd2e8 -AS)
  • the handler method for the "registrationform::execute" hook OrcidProfilePlugin.inc.php#L385 is also broken because of changes to the execute function signature of the form, the user object is no longer passed as an argument to the hook. I still have no idea how to access the user in this hook, because now the local "$user" variable wont get passed to the "parent::execute" call, which in turn calls the hooks. (See #66 for stable-3_1_2, and 5d864b8 and pkp/pkp-lib@e192a4d for master. - AS)

I probably need some help in fixing this, as I am also working on other stuff.

Just wanted to put that issue out there, so that the bug is known and I don't forget to work on it.

Greetings from Heidelberg,

Nils

Fatal error when used on site registration

Describe the bug
Plugin causes 500 error on the registration page in the site context.

To Reproduce
Steps to reproduce the behavior:

  1. Enable orcidProfile pluigin
  2. Initiate registration within the site context
  3. See error: PHP Fatal error: Uncaught Error: Call to a member function getId() on null

Expected behavior
Either registration using the orcidProfile plugin works within the site index, or the code fails gracefully to register without orcidProfile functionality in the site index.

Additional context
https://forum.pkp.sfu.ca/t/error-500-registration-page/57411/4?u=ctgraham

ORCID icon displayed for unauthenticated IDs

Describe the bug
If ORCID IDs have been assigned to contributors before the plugin is activated, on activation the green ORCID icon is shown on the article details page without authentication.

To Reproduce
Steps to reproduce the behavior:

  1. Deactivate the orcidProfile plugin
  2. Enter ORCID ID for a contributor in the article publication stage
  3. Publish Article
  4. Activate orcidProfile plugin
  5. Go to details page
  6. See green ORCID icon

Expected behavior
As the ORCID id has not been authorized, it should be displayed without the green ORCID icon.

Screenshots

I used a valid but non-existing ORCID id ( (see https://support.orcid.org/hc/en-us/articles/360006897674-Structure-of-the-ORCID-Identifier)

Before activation:
image

After activation:
image

Additional context
OJS 3.3.0.8
orcidProfile 1.1.3.4

[OPS] Pushing works information into researcher's ORCID record

Is your feature request related to a problem? Please describe.
ORCID Members that are using Member's API have the possibility to adding posted works into a researcher's ORCID record when their preprint gets posted.

However, currently the ORCID plugin for OPS doesn't do that.

Describe the solution you'd like
Allow preprint servers that are ORCID members to "push" works information into researcher's ORCID record following these instructions:

https://members.orcid.org/api/workflow/publishing-systems

Refactor email sending code to use new mailing system

Is your feature request related to a problem? Please describe.
ORCID plugin sends an email with an authorization link to the author, it uses the old MailTemplate class to compose and send it.

Describe the solution you'd like
Refactor the code to use the new mailing system. E.g., create 2 new classes extending pkp\mail\Mailable, which represent 2 types of emails sent to the author; use Mailer::Mailables hook to make those mailables configurable through the UI.

Allow configuration of the ORCID ID as required

Multiple publishers have requested the option to make the ORCID ID field mandatory for the submitting author on the submission form. In cases where publishers require an author's ORCID ID, making the field required would save the publishers' time in tracking down missing IDs, as well as encouraging the use of ORCID in general.

This was requested on the forum: https://forum.pkp.sfu.ca/t/making-orcid-required-field/45810/

There is some discussion in the forum post about how to make the ID required for only the submitting author and not all authors, so perhaps it could be instead required on the user registration form and for that information to be used in the submitting author's contributor record. Making the ORCID ID required on the user registration form has also been requested on the forum by multiple users.

Implement emails to authors requesting ORCIDs in QuickSubmit submissions

The ORCID Profile plugin allows the submitting user to request co-authors to authenticate their ORCIDs at the end of the submission process. It works by sending an email to these authors with instructions for linking their ORCIDs with the submission.

This currently does not work for QuickSubmit-based submissions; the email is never sent.

Send authorization emails to contributors (co-authors) upon publication

Describe the issue

Prior to OJS 3.4, the submission wizard had a hook in 'submissionsubmitstep3form::execute'.

This hook was used by orcidProfile plugin to send Authors without OcidIDs emails to gather their orcid ids upon publication.

From OJS 3.4 on, the submission wizard is redesigned, therfore a mechanism to trigger the email function needed.

To Reproduce
Steps to reproduce the behavior:

  1. Configure orcid plugin
  2. Go to contributors' page
  3. Add a contributor (do not authenticate using orcid)
  4. Publish the article
  5. No emails in contributor email.

Expected behavior

  1. An email asking verification

Additional context

OJS 3.4

OPS 3.4

Validate Client-Id and secret in Settings and en-/disable plugin

Is your feature request related to a problem? Please describe.

Journal managers / journal editors configure the plugin incorrectly in the settings.

Possible reasons

  • Incorrect ORCID-Token - 64 characters string
  • Incorrect Client-ID - (APP-[\da-zA-Z]{16}|(\d{4}-){3,}\d{3}[\dX])
  • Missing ORCID-Token and/or Client-ID

Describe the solution you'd like

Disable the plugin for users and co-authors, if there are configuration errors.

Add ORCID icon to contributors grid row for authenticated ORCID ids

Hi everyone,

during the work for pkp/pkp-lib#2818 and testing the new additions @alainna suggested, that it would be nice for editors to see at a glance which Authors have an authenticated ORCID id stored.

I talked with @NateWr in the pkp-dev Slack channel about this. He suggested something like this:

selection_079

What would be the condition for the display to come?

As per the ORCID display guidelines (https://orcid.org/trademark-and-id-display-guidelines#02-b) the icon should only be displayed for authenticated ORCID ids. I could check for the plugin specfic Author setting "orcidAccessToken", which is only stored after successful authorization by the owner of the ORCID id.

Edit: Added link to ORCID display guidelines

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.