rmuojs
March 18, 2019, 10:18pm
1
Hi,
we’re starting with OJS.
Recently we uploaded a journal vía quicksubmit and update from 3.1.x to 3.1.2, turns out ours pdf’s aren’t shown neither downloaded screen goes blank and php log reports:
PHP Fatal error: Uncaught Error: Call to undefined method SubmissionFileManager::downloadFile() in /home/rmuadm/public_html/ojsrmu/pages/article/ArticleHandler.inc.php:278
Stack trace:
#0 /home/rmuadm/public_html/ojsrmu/lib/pkp/classes/core/PKPRouter.inc.php(390): ArticleHandler->download(Array, Object(Request))
#1 /home/rmuadm/public_html/ojsrmu/lib/pkp/classes/core/PKPPageRouter.inc.php(231): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false)
#2 /home/rmuadm/public_html/ojsrmu/lib/pkp/classes/core/Dispatcher.inc.php(134): PKPPageRouter->route(Object(Request))
#3 /home/rmuadm/public_html/ojsrmu/lib/pkp/classes/core/PKPApplication.inc.php(252): Dispatcher->dispatch(Object(Request))
#4 /home/rmuadm/public_html/ojsrmu/index.php(68): PKPApplication->execute()
Appreciate any guidance in the matter.
Regrads,
RMU Team
Hey @rmuojs
I think you’re hitting old code. That particular line of ArticleHandler.inc.php is only in the older 3.1.x version of OJS. If you look at the new 3.1.2 release you’ll see that the code is quite different.
/**
* Download an article file
* @param array $args
* @param PKPRequest $request
*/
function download($args, $request) {
$articleId = isset($args[0]) ? $args[0] : 0;
$galleyId = isset($args[1]) ? $args[1] : 0;
$fileId = isset($args[2]) ? (int) $args[2] : 0;
if (!isset($this->galley)) $request->getDispatcher()->handle404();
if ($this->galley->getRemoteURL()) $request->redirectUrl($this->galley->getRemoteURL());
else if ($this->userCanViewGalley($request, $articleId, $galleyId)) {
if (!$fileId) {
$submissionFile = $this->galley->getFile();
if ($submissionFile) {
$fileId = $submissionFile->getFileId();
// The file manager expects the real article id. Extract it from the submission file.
$articleId = $submissionFile->getSubmissionId();
} else { // no proof files assigned to this galley!
Files are now downloaded by file id (line 291).
Are you sure you’re running on the new codebase?
Cheers,
Jason
rmuojs
March 19, 2019, 2:01pm
3
Hello and thanks for your answer.
Pretty sure we’ve updated to 3.1.2, system reports " Versión actual: 3.1.2.0 (marzo 14, 2019 - 03:45 )" but maybe something goes wrong in the update procedure.
We will look into that!
Thanks again
rmuojs
March 22, 2019, 10:48am
4
Thanks, we reinstalled everything and now it works fine.
Regards!
1 Like