when logged in, the article submission is shown fine
yet, when not logged in, a blank page is shown, and this error is logged:
[Sun Sep 24 00:24:01.880914 2023] [php:error] [pid 22] [client 172.26.0.13:42420] PHP Fatal error:
Uncaught Error: Call to a member function getAuthorizedContextObject() on null in
/var/www/html/lib/pkp/classes/handler/PKPHandler.php:190\nStack trace:\n#0
/var/www/html/pages/reviewer/ReviewerHandler.php(108): PKP\\handler\\PKPHandler->getAuthorizedContextObject()\n#1
/var/www/html/pages/reviewer/ReviewerHandler.php(67): APP\\pages\\reviewer\\ReviewerHandler->_validateAccessKey()\n#2
/var/www/html/lib/pkp/classes/core/PKPRouter.php(324): APP\\pages\\reviewer\\ReviewerHandler->authorize()\n#3
/var/www/html/lib/pkp/classes/core/PKPPageRouter.php(277): PKP\\core\\PKPRouter->_authorizeInitializeAndCallRequest()\n#4
/var/www/html/lib/pkp/classes/core/Dispatcher.php(165): PKP\\core\\PKPPageRouter->route()\n#5
/var/www/html/lib/pkp/classes/core/PKPApplication.php(387): PKP\\core\\Dispatcher->dispatch()\n#6
/var/www/html/index.php(21): PKP\\core\\PKPApplication->execute()\n#7 {main}\n thrown in
/var/www/html/lib/pkp/classes/handler/PKPHandler.php on line 190
Of course, reviewers typically won’t be logged in prior to clicking that link, and they’re left without any feedback whatsoever that anything went wrong.
Update: apparently, the “key” request parameter in the generated URL seems to make a difference. Compare this behaviour for a user who is not logged in:
after logging in, the user is redirected to the right review form
Questions:
Does this help in pinpointing the issue?
Is the “key” request parameter necessary, and can it be removed from the generated links? In this case, it’s generated from the {$reviewAssignmentUrl}variable. Can the “key=8BFq7c” part be stripped when generating its value?
This really is a blocker for upgrading our journal to OJS-3.4.0, so any pointers are much appreciated!
Just a quick note to say – I’ve got this thread open on my browser and am waiting for a moment to dig into it; sorry for the delay. You’re correct in tracking the source of key to the one-click reviewer access feature, and disabling that feature (at least temporarily) should solve the error you’ve run into. I’ll try to do some local testing here to see if I can replicate the problem and then fix it.
Regards,
Alec Smecher
Public Knowledge Project Team
Ok, thanks for confirming, @asmecher . If this is the only case where these keys are used in the app, we can temporarily do without them and go on with more conficence.
If you have user account validation turned on (require_validation in config.inc.php) that relies on some of the same infrastructural tools, so it’s possible it might also be affected – but I’ll have to do some investigation either way.
Regards,
Alec Smecher
Public Knowledge Project Team
Thanks for confirming, and good luck with the upgrade! (Note that we’ll be releasing another 3.4.0-x build in a few weeks – nothing major, but it’ll include this fix along with a number of others.)
Regards,
Alec Smecher
Public Knowledge Project Team