Can not create a revision of an existing document. HTTP Error

I’m running OJS
Problem Description:
When uploading a file for a revision if you select that you are uploading a revision of an existing file then proceed to upload a file you will get a “HTTP Error”. This does not happen if you select “This is not a revision of an existing file”. I can reproduce the error no matter which type of user is logged in and it doesn’t matter who the original up-loader is. The error in the error log is:

PHP Fatal error:  Uncaught Error: Call to a member function getSubmissionId() on null in /var/www/sites/jchla/lib/pkp/classes/submission/
Stack trace:
#0 /var/www/sites/jchla/lib/pkp/controllers/wizard/fileUpload/ SubmissionFileDAO->assignRevisionToReviewRound(79497, 8, NULL)
#1 /var/www/sites/jchla/controllers/wizard/fileUpload/ PKPFileUploadWizardHandler->_attachEntities(Object(SubmissionFile))
#2 /var/www/sites/jchla/lib/pkp/controllers/wizard/fileUpload/ FileUploadWizardHandler->_attachEntities(Object(SubmissionFile))
#3 /var/www/sites/jchla/lib/pkp/classes/core/ PKPFileUploadWizardHandler->uploadFile(Array, Object(Request))
#4 /var/www/sites/jchla/lib/pkp/classes/core/ PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#5 /var/www/sites/jchla/lib/pkp/classes/core/ PKPComponent in /var/www/sites/jchla/lib/pkp/classes/submission/ on line 456

Another important aspect is even with the error the history of the original file is updated and the physical file does get uploaded onto the server but it’s does not appear in the interface.

Also note the same error is in this post:

Here is a screen shot of the problem:

Hi, I had the same problem and after the feedback from Nate, in my case, was solved by applying this commit.

1 Like

Thanks. We are upgrading to 3.3 soon so I suppose that fix will be included.

1 Like