Error removing a journal from a multi-journal OJS 3.3 installation: PHP Fatal error: Uncaught Error: Call to a member function getId() on null in Pending Revisions NotificationManager.inc.php

What application are you using?
OJS 3.3.0-20 with PHP 7.4.3 and MariaDB 5.5

Describe the issue or problem
Trying to remove a journal from a multi-journal OJS 3.3 installation.
In “Administration > Hosted Journals” I click on “Remove” button of the journal I want to remove, then I click “OK” in the “Confirm” popup windows. The procedure stocks and never finish, the popup window never closes (see screenshot).
After waiting for a while (even 30 minutes), I close the Confirm popup window, reload the “Administration > Hosted Journals” page and see that the journal has been removed.
Also, the files of the removed journal in OJS files_dir have been correctly removed.

Checking the database tables I see that

  • the journal has been deleted from the “journals” table but only part of the submissions of that journal have been actually deleted in “submissions” table
  • also other data related to the not-deleted submissions have not been deleted in many tables like, for example review_rounds, review_rounds_files, review_files, …

Checking the PHP error log file I see the error below:

PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /ojs/installation/path/lib/pkp/classes/notification/managerDelegate/PendingRevisionsNotificationManager.inc.php:119

Stack trace:
#0 /ojs/installation/path/lib/pkp/classes/notification/PKPNotificationManager.inc.php(338): PendingRevisionsNotificationManager->updateNotification()
#1 /ojs/installation/path/lib/pkp/classes/services/PKPSubmissionFileService.inc.php(553): PKPNotificationManager->updateNotification()
#2 /ojs/installation/path/lib/pkp/classes/submission/PKPSubmissionDAO.inc.php(129): PKP\Services\PKPSubmissionFileService->delete()
#3 /ojs/installation/path/classes/submission/SubmissionDAO.inc.php(51): PKPSubmissionDAO->deleteById()
#4 /ojs/installation/path/lib/pkp/classes/submission/PKPSubmissionDAO.inc.php(239): SubmissionDAO->deleteById()
#5 /ojs/installation/path/classes/services/ContextService.inc.php(164): PKPS in /ojs/installation/path/lib/pkp/classes/notification/managerDelegate/PendingRevisionsNotificationManager.inc.php on line 119

If I try to remove the not-deleted submissions by the CLI tool deleteSubmissions.php I get the error below:

# php tools/deleteSubmissions.php 111
PHP Fatal error: Uncaught Error: Call to a member function getStatus() on null in /ojs/installation/path//lib/pkp/classes/submission/reviewRound/ReviewRoundDAO.inc.php:238

Stack trace:
#0 /ojs/installation/path//lib/pkp/classes/services/PKPSubmissionFileService.inc.php(530): ReviewRoundDAO->updateStatus()
#1 /ojs/installation/path//lib/pkp/classes/submission/PKPSubmissionDAO.inc.php(129): PKP\Services\PKPSubmissionFileService->delete()
#2 /ojs/installation/path//classes/submission/SubmissionDAO.inc.php(51): PKPSubmissionDAO->deleteById()
#3 /ojs/installation/path//tools/deleteSubmissions.php(56): SubmissionDAO->deleteById()
#4 /ojs/installation/path//tools/deleteSubmissions.php(62): SubmissionDeletionTool->execute()
#5 {main}
thrown in /ojs/installation/path//lib/pkp/classes/submission/reviewRound/ReviewRoundDAO.inc.php on line 238

Fatal error: Uncaught Error: Call to a member function getStatus() on null in /ojs/installation/path//lib/pkp/classes/submission/reviewRound/ReviewRoundDAO.inc.php:238
Stack trace:
#0 /ojs/installation/path//lib/pkp/classes/services/PKPSubmissionFileService.inc.php(530): ReviewRoundDAO->updateStatus()
#1 /ojs/installation/path//lib/pkp/classes/submission/PKPSubmissionDAO.inc.php(129): PKP\Services\PKPSubmissionFileService->delete()
#2 /ojs/installation/path//classes/submission/SubmissionDAO.inc.php(51): PKPSubmissionDAO->deleteById()
#3 /ojs/installation/path//tools/deleteSubmissions.php(56): SubmissionDAO->deleteById()
#4 /ojs/installation/path//tools/deleteSubmissions.php(62): SubmissionDeletionTool->execute()
#5 {main}
thrown in /ojs/installation/path//lib/pkp/classes/submission/reviewRound/ReviewRoundDAO.inc.php on line 238

I am stuck on this problem that I cannot solve.
I have searched Google and the forum extensively without success.
Would anyone be able to give me any suggestions as to what might be the cause of this malfunction or at least in what direction I can investigate?

@asmecher @Vitaliy @ajnyga ?

Thanks in advance

Hi @razzi,

This is a database inconsistency; if you can live with it for the moment, my recommendation is to let it be until you upgrade to 3.4.0 or 3.5.0. The upgrade from 3.3 to 3.4 in particular adds foreign key constrains and cleans up bad data in the process. When you’re able to upgrade, that should resolve it.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks for the feedback, @asmecher !

I can live with this DB inconsistency until the upgrade to OJS 3.5 which I have planned to do by the end of this year, hoping that the release of the 3.5 will actually be by July of this year.

Hope your development of OJS and OMP 3.5 is going on well and smooth and that the scheduling announced in your last webinar (What’s new in Open Journal Systems 3.5) is still ok.
Any case, once again, thanks for your great work on OJS and OMP!

1 Like

This topic was automatically closed after 13 days. New replies are no longer allowed.