HTTP ERROR 500 from the link for direct access to articles ojs 3.3.0.12

Hello,
when the article review emails are sent with the link for automatic access, clicking on the link shows “HTTP ERROR 500”.
I looked at the apache log and these are the errors:

|21/02/2023 12:35:03|WARNING: [pool www.xxx.org] child 19841 said into stderr: #4 /web/htdocs/www.xxx.org/home/ojs/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch()

|21/02/2023 12:35:03|WARNING: [pool www.xxx.org] child 19841 said into stderr: #5 /web/htdocs/www.xxx.org/home/ojs/index.php(68): PKPApplication->execute()|

|21/02/2023 12:35:03|WARNING: [pool www.xxx.org] child 19841 said into stderr: #6 {main}|

|21/02/2023 12:35:03|WARNING: [pool www.xxx.org] child 19841 said into stderr: thrown in /web/htdocs/www.xxx.org/home/ojs/pages/reviewer/ReviewerHandler.inc.php on line 78|

ReviewerHandler.inc.php on line 76-84:

76 $context = $request->getContext();
77 $accessKeyManager = new AccessKeyManager();
78 $accessKeyHash = AccessKeyManager::generateKeyHash($accessKeyCode);
79 $accessKey = $accessKeyManager->validateKey(
80 $context->getId(),
81 $reviewerSubmission->getReviewerId(),
82 $accessKeyHash
83 );
84 if (!$accessKey) return;

Can anyone give me a solution? Thank you very much

hi @Angelo_Ceppari

Your pasted error message is missing the beginning of the stack trace (it starts at #4). If you can post the rest of it we’d be able to help.

Best
Jason

Hi @jnugent

I apologize for the error, I am sending you the whole log.

22/02/2023 10:34:59 WARNING: [pool www.xxx.org] child 20329 said into stderr: [22-Feb-2023 10:34:59 Europe/Rome] PHP Fatal error: Uncaught Error: Non-static method AccessKeyManager::generateKeyHash() cannot be called statically in /web/htdocs/www.xxx.org/home/ojs/pages/reviewer/ReviewerHandler.inc.php:78

|22/02/2023 10:34:59|WARNING: [pool www.xxx.org] child 20329 said into stderr: Stack trace:|

|22/02/2023 10:34:59|WARNING: [pool www.xxx.org] child 20329 said into stderr: #0 /web/htdocs/www.xxx.org/home/ojs/pages/reviewer/ReviewerHandler.inc.php(38): ReviewerHandler->_validateAccessKey()|

|22/02/2023 10:34:59|WARNING: [pool www.xxx.org] child 20329 said into stderr: #1 /web/htdocs/www.xxx.org/home/ojs/lib/pkp/classes/core/PKPRouter.inc.php(387): ReviewerHandler->authorize()|

|22/02/2023 10:34:59|WARNING: [pool www.xxx.org] child 20329 said into stderr: #2 /web/htdocs/www.xxx.org/home/ojs/lib/pkp/classes/core/PKPPageRouter.inc.php(246): PKPRouter->_authorizeInitializeAndCallRequest()|

|22/02/2023 10:34:59|WARNING: [pool www.xxx.org] child 20329 said into stderr: #3 /web/htdocs/www.xxx.org/home/ojs/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPPageRouter->route()|

|22/02/2023 10:34:59|WARNING: [pool www.xxx.org] child 20329 said into stderr: #4 /web/htdocs/www.xxx.org/home/ojs/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch()|

|22/02/2023 10:34:59|WARNING: [pool www.xxx.org] child 20329 said into stderr: #5 /web/htdocs/www.xxx.org/home/ojs/index.php(68): PKPApplication->execute()|

|22/02/2023 10:34:59|WARNING: [pool www.xxx.org] child 20329 said into stderr: #6 {main}|

|22/02/2023 10:34:59|WARNING: [pool www.xxx.org] child 20329 said into stderr: thrown in /web/htdocs/www.argumenta.org/home/ojs/pages/reviewer/ReviewerHandler.inc.php on line 78||

Thank you so much for the help!

Hi @Angelo_Ceppari

It sounds like you’re running into a PHP 8 compatibility problem with OJS 3.3.0.12. This has been fixed in 3.3.0.14:

So I suggest either adjusting the code or performing the small upgrade to 3.3.0.14 since there are other PHP 8 quirks fixed in the newest version.

Best
Jason

1 Like

Hi @jnugent thank you for the help, eventually I changed the line 78 instead of upgrading OJS, and everything started working as expected.

Best regards,
Angelo.