ORCID Plugin in OJS - Error Occurs During Thank You Email for Review Submission

Hi,
we are currently experiencing an issue with the ORCID plugin in OJS. An error occurs when a reviewer possesses a validated ORCID and the editor sends the Thank You email for review submission. Consequently, the email fails to deliver, and the OJS interface remains stuck at this stage, with the spinning wheel.

[27-May-2023 13:11:45 Asia/Riyadh] PHP Fatal error: Uncaught TypeError: Carbon\Carbon::setLastErrors(): Argument #1 ($lastErrors) must be of type array, bool given, called in /home/seisense/journal.seisense.com/lib/pkp/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 96 and defined in /home/seisense/journal.seisense.com/lib/pkp/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:897
Stack trace:
#0 /home/seisense/journal.seisense.com/lib/pkp/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php(96): Carbon\Carbon::setLastErrors()
#1 /home/seisense/journal.seisense.com/lib/pkp/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php(183): Carbon\Carbon->__construct()
#2 /home/seisense/journal.seisense.com/lib/pkp/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php(214): Carbon\Carbon::rawParse()
#3 /home/seisense/journal.seisense.com/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php(846): Carbon\Carbon::parse()
#4 /home/seisense/journal.seisense.com/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php(156): OrcidProfilePlugin->publishReviewerWorkToOrcid()
#5 /home/seisense/journal.seisense.com/lib/pkp/classes/plugins/HookRegistry.inc.php(107): OrcidProfilePlugin->handleThankReviewer()
#6 /home/seisense/journal.seisense.com/lib/pkp/controllers/grid/users/reviewer/form/ThankReviewerForm.inc.php(111): HookRegistry::call()
#7 /home/seisense/journal.seisense.com/lib/pkp/classes/controllers/grid/users/reviewer/PKPReviewerGridHandler.inc.php(707): ThankReviewerForm->execute()
#8 /home/seisense/journal.seisense.com/lib/pkp/classes/core/PKPRouter.inc.php(395): PKPReviewerGridHandler->thankReviewer()
#9 /home/seisense/journal.seisense.com/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest()
#10 /home/seisense/journal.seisense.com/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPComponentRouter->route()
#11 /home/seisense/journal.seisense.com/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch()
#12 /home/seisense/journal.seisense.com/index.php(68): PKPApplication->execute()
#13 {main}
thrown in /home/seisense/journal.seisense.com/lib/pkp/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 897

OJS: 3.3.0.13
PHP: 8.2

Thank you for your understanding and support.
seisense

Hi @seisense,

Can you also please indicate the version of the ORCID plugin that you’re using ?

-Roger

ORCID version: 1.1.3.7 (latest version)

1 Like

Today, we accepted an article for publication; however, the system failed to send the corresponding email notification to the authors. The OJS interface remains stuck with the spinning wheel, indicating that the email is not being processed.

Upon further investigation, we reviewed the PHP error log and noticed the following error entries related to this problem:

[29-May-2023 13:30:23 Asia/Riyadh] PHP Fatal error: Uncaught TypeError: Carbon\Carbon::setLastErrors(): Argument #1 ($lastErrors) must be of type array, bool given, called in /home/seisense/journal.seisense.com/lib/pkp/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 96 and defined in /home/seisense/journal.seisense.com/lib/pkp/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:897
Stack trace:
#0 /home/seisense/journal.seisense.com/lib/pkp/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php(96): Carbon\Carbon::setLastErrors()
#1 /home/seisense/journal.seisense.com/lib/pkp/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php(183): Carbon\Carbon->__construct()
#2 /home/seisense/journal.seisense.com/lib/pkp/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php(214): Carbon\Carbon::rawParse()
#3 /home/seisense/journal.seisense.com/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php(1461): Carbon\Carbon::parse()
#4 /home/seisense/journal.seisense.com/lib/pkp/classes/plugins/HookRegistry.inc.php(107): OrcidProfilePlugin->handleEditorAction()
#5 /home/seisense/journal.seisense.com/lib/pkp/classes/submission/action/EditorAction.inc.php(72): HookRegistry::call()
#6 /home/seisense/journal.seisense.com/lib/pkp/controllers/modals/editorDecision/form/PromoteForm.inc.php(92): EditorAction->recordDecision()
#7 /home/seisense/journal.seisense.com/lib/pkp/classes/controllers/modals/editorDecision/PKPEditorDecisionHandler.inc.php(467): PromoteForm->execute()
#8 /home/seisense/journal.seisense.com/controllers/modals/editorDecision/EditorDecisionHandler.inc.php(103): PKPEditorDecisionHandler->_saveEditorDecision()
#9 /home/seisense/journal.seisense.com/lib/pkp/classes/controllers/modals/editorDecision/PKPEditorDecisionHandler.inc.php(187): EditorDecisionHandler->_saveGeneralPromote()
#10 /home/seisense/journal.seisense.com/lib/pkp/classes/core/PKPRouter.inc.php(395): PKPEditorDecisionHandler->savePromoteInReview()
#11 /home/seisense/journal.seisense.com/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest()
#12 /home/seisense/journal.seisense.com/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPComponentRouter->route()
#13 /home/seisense/journal.seisense.com/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch()
#14 /home/seisense/journal.seisense.com/index.php(68): PKPApplication->execute()
#15 {main}
thrown in /home/seisense/journal.seisense.com/lib/pkp/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 897

To overcome this hurdle and communicate the editorial decision to the authors, we had to disable the ORCID plugin temporarily. Only after doing so were we able to record the editor’s decision of accepting the article.
Thanks

@Dulip_Withanage - are you able to assist with this?

@seisense do you have the public api or member api?
This functionality is only meant for member api usage. If you have the correct version of the plugin, you should have the call to the method in line in 159

We are using Public API only and we have always updated the ORCID plugin from within the PKP OJS plugin gallery. Please see the screenshot.
Thanks

@seisense
that installation seems right.
I have checked again, can you check in the server the line 159 of of plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php to check if it reflects the link I posted before.

plugin should relfect this file, which is integrated in the plugin gallery.
https://github.com/pkp/orcidProfile/releases/download/v1_1_3-7/orcidProfile-v1_1_3-7.tar.gz

May be also do a cache clean for the template cache under administrator, just to make sure, if everything is loaded accordingly.

I did the following steps to further explore this issue:
1- Deleted the ORCID plugin and installed it again after downloading the latest plugin from the link provided above.
2- Verifed at line 159 of pkp/orcidProfile/blob/stable-3_3_0/OrcidProfilePlugin.inc.php#L159. The code is there.
3- Created a dummy user and tried to authenticate the user from within the user profile by clicking the button " Authorize and Connect Your ORCID iD" but it does not authenticate and produces the same error message in PHP error log file.

hm, can your system generally send emails ?

Yes, there is no problem in sending and receiving emails in general from within the OJS.

Do you have right credentials!?
You must test orcid public api with orcid sandbox first

Dear @seisense
I had a similar problem. My solution was to use PHP8.1 instead of PHP8.2
Maybe that help for you, too.
Best
Klaus

Dear @klausru Thanks for offering me your tried and tested solution. Yes, it worked like a charm.
Thanks

1 Like