[OJS] Access denied to upload discussion file

Hi there.

Access denied when uploading a file in Review Discussions > Update Discussion > Upload File > Upload a discussion file there is a message with “Access denied”.
Captura de pantalla (662)

I have this messages:

“GET /index.php/eaa/$$$call$$$/wizard/file-upload/file-upload-wizard/start-wizard?fileStage=18&reviewRoundId=&assocType=520&assocId=376&queryId=243&submissionId=2715&stageId=3&uploaderRoles=16-17-4097-4096-65536&_=1624050158439 HTTP/1.1” 200 1313 “/workflow/index/2715/4” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36”

PHP Fatal error: Uncaught TypeError: Argument 1 passed to Sokil\IsoCodes\Database\Countries::getByAlpha2() must be of the type string, null given, called in /pages/search/SearchHandler.inc.php on line 272 and defined in /lib/pkp/lib/vendor/sokil/php-isocodes/src/Database/Countries.php:42\nStack trace:
n#0 /pages/search/SearchHandler.inc.php(272): Sokil\IsoCodes\Database\Countries->getByAlpha2()
n#1 /lib/pkp/classes/core/PKPRouter.inc.php(391): SearchHandler->authors()
n#2 /lib/pkp/classes/core/PKPPageRouter.inc.php(231): PKPRouter->_authorizeInitializeAndCallRequest()
n#3 /lib/pkp/classes/core/Dispatcher.inc.php(143): PKPPageRouter->route()
n#4 /lib/pkp/classes/core/PKPApplication.inc.php(281): Dispatcher->dispatch()
n#5 /v in /lib/pkp/lib/vendor/sokil/php-isocodes/src/Database/Countries.php on line 42

Thank you, regards.

1 Like

Hi @Elena_Najera,

Has this journal recently been upgraded? And is an error like this happening anywhere else, or is it just happening with the reviewer discussion file upload/this review discussion in particular?

The author being fetched in SearchHandler.inc.php does not appear to have a country set and this may be causing the PHP Fatal Error. Could you also see if the author’s associated with the submission have a country set?



PKP Team

Thanks for the reply @ewhanson

I have found an explanation, in previous versions it allowed to upload a file to the discussion even if you have not created that discussion, but in this version it does not allow uploading files if the discussion does not belong to you.

The journal migrated a few weeks ago and users now do not have an established country.
I will have to register the countries again.