tools/deleteSubmissions.php error

Hi,
I’m running ojs 3.3.0.8
After running a php import (which failed)
I’m trying to delete the submissions with tools/deleteSubmissions.php and get the error below. It seems to only partially delete the submission. The tabs (unassigned, All Active, Archives) in the submissions section do not decrement their totals, but the submissions have disappeared from view.

PHP Fatal error: Uncaught Error: Call to a member function getUsername() on null in /var/www/sites/scancan/lib/pkp/classes/services/PKPSubmissionFileService.inc.php:597
Stack trace:
#0 /var/www/sites/scancan/lib/pkp/classes/submission/PKPSubmissionDAO.inc.php(129): PKP\Services\PKPSubmissionFileService->delete(Object(SubmissionFile))
#1 /var/www/sites/scancan/classes/submission/SubmissionDAO.inc.php(51): PKPSubmissionDAO->deleteById(‘24’)
#2 /var/www/sites/scancan/tools/deleteSubmissions.php(56): SubmissionDAO->deleteById(‘24’)
#3 /var/www/sites/scancan/tools/deleteSubmissions.php(62): SubmissionDeletionTool->execute()

1 Like

I got the same error message.
Calling the command repeatedly 5 times did the job:
php ./tools/deleteSubmissions.php 170
php ./tools/deleteSubmissions.php 170
php ./tools/deleteSubmissions.php 170
php ./tools/deleteSubmissions.php 170
php ./tools/deleteSubmissions.php 170

Yes, if there are multiple file uploads (manuscript, figures etc.) you need to repeat until every file is deleted.

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