One-click link within email generate PHP Error "Non-static method cannot be called statically"

Context : OJS version 3.3.0-11, PHP version 8.0.20

The direct “one click” link (e.g. of the form: https://dev.ojs.umontreal.ca/index.php/abc/reviewer/submission?submissionId=xx&reviewId=xx&key=xxxxxx) included within the email sent to the reviewer generates an error.

PHP Log:

[27-Oct-2022 13:53:10 UTC] PHP Fatal error:  Uncaught Error: Non-static method AccessKeyManager::generateKeyHash() cannot be called statically in /apps/ojs/dev/ojs-3.3.0-11/pages/reviewer/ReviewerHandler.inc.php:78
Stack trace:
#0 /apps/ojs/dev/ojs-3.3.0-11/pages/reviewer/ReviewerHandler.inc.php(38): ReviewerHandler->_validateAccessKey()
#1 /apps/ojs/dev/ojs-3.3.0-11/lib/pkp/classes/core/PKPRouter.inc.php(387): ReviewerHandler->authorize()
#2 /apps/ojs/dev/ojs-3.3.0-11/lib/pkp/classes/core/PKPPageRouter.inc.php(246): PKPRouter->_authorizeInitializeAndCallRequest()
#3 /apps/ojs/dev/ojs-3.3.0-11/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPPageRouter->route()
#4 /apps/ojs/dev/ojs-3.3.0-11/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch()
#5 /apps/ojs/dev/ojs-3.3.0-11/index.php(67): PKPApplication->execute()
#6 {main}
  thrown in /apps/ojs/dev/ojs-3.3.0-11/pages/reviewer/ReviewerHandler.inc.php on line 78

I saw mentions, in the Forum, of maybe downgrading to PHP 7.4 to resolve those kind of issues? Or maybe upgrading to OJS 3.3.0-13? Or else?

Thank you for your help

Marie-Hélène V.

Hi @Marie-Helene,

Thanks for reporting – see Resolve static call error message accessing reviewer one-click link · Issue #8378 · pkp/pkp-lib · GitHub for details. You’ll either need to apply a small patch to the code, or use PHP7.4. I’ll get this included in the next OJS release (3.3.0-14).

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Thank you @asmecher. The quick and easy fix did the trick!

1 Like