[SOLVED] OJS 3.1.1 Submission Library upload link to a black page


We uploaded a PDF file to Submission Library, but when try to click on the link, we get a blank page with the following error:

Fatal error: Call to a member function getAuthorizedContextObject() on null in /var/www/journals/lib/pkp/classes/handler/PKPHandler.inc.php on line 140

Any suggestion?

Hi @haroldg!

Could you please provide some screenshots on the flow you are following in order to get that behavior? Are there any other PHP logs that are produced by that flow?

Thank you in advance!


When click on the link in the screenshot below, it goes to a blank page:


with the following error:


Hi community (including @asmecher),

Same problem here too.

Author updated some files to submission library. These files can be viewed as follows:

When the editor tries to view or download any of the files, s/he gets 500 error:

php error_log as follows:

PHP Fatal error:  Uncaught Error: Call to a member function getAuthorizedContextObject() on null in /home/jlmcedun/public_html/lib/pkp/classes/handler/PKPHandler.inc.php:140
Stack trace:
#0 /home/jlmcedun/public_html/lib/pkp/pages/libraryFiles/LibraryFileHandler.inc.php(67): PKPHandler->getAuthorizedContextObject(1048583)
#1 /home/jlmcedun/public_html/lib/pkp/controllers/api/file/FileApiHandler.inc.php(106): LibraryFileHandler->downloadLibraryFile(Array, Object(Request))
#2 /home/jlmcedun/public_html/lib/pkp/classes/core/PKPRouter.inc.php(372): FileApiHandler->downloadLibraryFile(Array, Object(Request))
#3 /home/jlmcedun/public_html/lib/pkp/classes/core/PKPComponentRouter.inc.php(256): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#4 /home/jlmcedun/public_html/lib/pkp/classes/core/Dispatcher.inc.php(134): PKPComponentRouter->route(Object(Request))
#5 /home/jlmcedun/public_html/lib/pkp/classes/core/PKPApplication.inc.php(247): Dispatcher->dispatch(Object(Request))
#6 /home/jlmcedun/public_html/ind in /home/jlmcedun/public_html/lib/pkp/classes/handler/PKPHandler.inc.php on line 140

Looking for a solution.

Best regards,

Hi all,

The following issue is filed to address this issue:


1 Like

Thanks Dimitris. Patch worked great.

It works for me too. Thanks.