PHP Fatal error: Uncaught Error: Call to a member function getSubmissionId() on null...pkp/classes/submission/SubmissionFileDAO.inc.php:456

Hi,
OJS: 3.2.1.2
PHP 7.4

I found the following error in my PHP error log and it has appeared 3 times in the error log so far. Please help me to fix the error.

[11-Jan-2021 07:43:00 America/New_York] PHP Fatal error:  Uncaught Error: Call to a member function getSubmissionId() on null in /home/seisense/journal.seisense.com/lib/pkp/classes/submission/SubmissionFileDAO.inc.php:456
Stack trace:
#0 /home/seisense/journal.seisense.com/lib/pkp/controllers/wizard/fileUpload/PKPFileUploadWizardHandler.inc.php(422): SubmissionFileDAO->assignRevisionToReviewRound(2593, 2, NULL)
#1 /home/seisense/journal.seisense.com/controllers/wizard/fileUpload/FileUploadWizardHandler.inc.php(31): PKPFileUploadWizardHandler->_attachEntities(Object(SubmissionFile))
#2 /home/seisense/journal.seisense.com/lib/pkp/controllers/wizard/fileUpload/PKPFileUploadWizardHandler.inc.php(375): FileUploadWizardHandler->_attachEntities(Object(SubmissionFile))
#3 /home/seisense/journal.seisense.com/lib/pkp/classes/core/PKPRouter.inc.php(391): PKPFileUploadWizardHandler->uploadFile(Array, Object(Request))
#4 /home/seisense/journal.seisense.com/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request),  in /home/seisense/journal.seisense.com/lib/pkp/classes/submission/SubmissionFileDAO.inc.php on line 456

Thanks

It looks like this error is related to a review round being expected but not passed:

A quick scan suggests that this might be happening when an editor decision is made (eg - request revisions) or when a revision is uploaded. You could try testing file handling around those actions to see if you can reproduce it. If you can find a reproducible steps we can investigate it further.

Hi @NateWr ,
You were right. I was able to produce this error following your lead.
It is happening when the author tries to upload the file in the revisions tab after the decision is already made on the submission.
Thanks and regards

I was unable to reproduce this using our stable-3_2_1 branch. I tried the following steps.

  1. Find a submission in review.
  2. Accept the submission and send it to copyediting.
  3. Login as author.
  4. Go to review stage as author.
  5. Upload a revision.

Can you reproduce this on a brand new submission? Iā€™m wondering if maybe thereā€™s some additional condition here that we havenā€™t detected. The other possibility is that this has been fixed in our stable-3_2_1 branch since 3.2.1-2 was released.

We donā€™t have the step-by-step that generates the problem, but @AlineDuarte sent a correction suggestion so as not to generate an error for users in these cases.

1 Like

We are using this fix on two customers who reported the same issue and resolved.

We achieved to reproduce the error in stable-3_2_1. The steps are:

  1. Find a submission in review and request revisions.
  2. Login as author.
  3. Go to review stage as author.
  4. Upload a revision.
  5. After that, upload another revision (different of the last), choose an existing file (to be substituted) and upload file, the message HTTP Error is shown.

Also, we did a test with a clean database and the same error occurred. Too we sent a correction suggestion in GitHub how quoted by @abadan.

2 Likes

After the feedback from Nate, in my case, the problem was solved by applying commit.

1 Like