File name conversion issue after the upgrade

I don’t know. This is why I always recommend making a backup and testing upgrades on a development server first. Always backup, always test.

@jnugent Ok as a final test, I have double check everything and seems ok till pitshop version and data and everything works pretty fine…where it is availalbe but, with version .7 it gives these errors

[17-Sep-2021 11:19:17 America/Chicago] Removing orphaned submission_files entry ID 1739 with submission_id 667
[17-Sep-2021 11:19:17 America/Chicago] Removing orphaned submission_files entry ID 1742 with submission_id 668
[17-Sep-2021 11:19:17 America/Chicago] Removing orphaned submission_files entry ID 1743 with submission_id 668
[17-Sep-2021 11:19:17 America/Chicago] Removing orphaned submission_files entry ID 1745 with submission_id 670
[17-Sep-2021 11:19:17 America/Chicago] Removing orphaned submission_files entry ID 1747 with submission_id 673
[17-Sep-2021 11:19:17 America/Chicago] Removing orphaned submission_files entry ID 1752 with submission_id 673
[17-Sep-2021 11:19:17 America/Chicago] Removing orphaned submission_files entry ID 1767 with submission_id 680
[17-Sep-2021 11:19:17 America/Chicago] Removing orphaned submission_files entry ID 1768 with submission_id 680
[17-Sep-2021 11:19:18 America/Chicago] A submission file was expected but not found at journals/1/articles/1/submission/1-1-1-1-2-20181126.pdf.
[17-Sep-2021 11:19:18 America/Chicago] A submission file was expected but not found at journals/1/articles/1/submission/1-1-1-2-2-20181129.pdf.
[17-Sep-2021 11:19:18 America/Chicago] A submission file was expected but not found at journals/1/articles/1/submission/final/1-1-2-1-6-20181126.pdf.
[17-Sep-2021 11:19:18 America/Chicago] A submission file was expected but not found at journals/1/articles/1/submission/copyedit/1-1-3-1-9-20181126.pdf.
[17-Sep-2021 11:19:18 America/Chicago] A submission file was expected but not found at journals/1/articles/1/submission/copyedit/1-1-4-1-9-20181126.pdf.
[17-Sep-2021 11:19:18 America/Chicago] A submission file was expected but not found at journals/1/articles/1/submission/review/1-1-5-1-4-20181129.pdf.
[17-Sep-2021 11:19:18 America/Chicago] A file assigned to the file stage 0 could not be migrated.
[17-Sep-2021 11:19:18 America/Chicago] A submission file was expected but not found at journals/1/articles/4//4–8-1-0-20130605.pdf.
[17-Sep-2021 11:19:18 America/Chicago] A file assigned to the file stage 0 could not be migrated.
[17-Sep-2021 11:19:18 America/Chicago] A submission file was expected but not found at journals/1/articles/4//4–9-1-0-20130605.pdf.
[17-Sep-2021 11:19:18 America/Chicago] A file assigned to the file stage 0 could not be migrated.
[17-Sep-2021 11:19:18 America/Chicago] A submission file was expected but not found at journals/1/articles/4//4–10-1-0-20130605.pdf.
[17-Sep-2021 11:19:18 America/Chicago] A file assigned to file stage 0 could not be migrated.

Apart from the above, can you explain what does this means and how it affects in future?

“A file assigned to the file stage 0 could not be migrated.”

The upgrade process is telling you that there are files missing for those submissions, on disk. They will probably not be accessible in the workflow.

Cheers,
Jason

@jnugent righto, thanks… but things are getting strange, as they working on 3.2.1.4 but it starts issues on -7… is not it strange?

what I am going to perform is to upgrade 3.2.1.4 to 3.3.0.3 and so on to see the effect… would this work of just a waste of time for me?

@jnugent I have gone through 10+ times, checked everything but as well as I step above 3.2.1.4 it crashes, what could be the other reason apart from what error log is generating?

Additional what query I have to run to clean specific submission id from a user where users may have more than one submission? I want to clean glitch submission… In previous versions admin was able to delete the submission… have you taken that part altogether or you just changed the location to deal with?

so query I am looking for

complete remove submission record for a user we want specific submission id

Thanks

@doneforyou there is a command line tool that comes with OJS for deleting submissions. You can run it from the main OJS directory, on the server:

php tools/removeSubmissions.php X Y Z

where X, Y, and Z are submission ids.

Best
Jason

@jnugent what if we dont have command line access :innocent:

If I remember correctly you can also decline a submission and then delete it. Submissions cannot be deleted before that, in OJS 3.3.

@jnugent thank you for your kind reply and continues bearing me, but as I told you the issue is bit different with us… The site was hacked and messed the database. Here is what we are doing - just for your quick review.

  1. We are reuploading the files to the users and maintaining hte archives in fact for older record, news are working fine. We are just uploading and going to product and gallay and then assigning them to issue so they can appear nicely in archives.
  2. The problem now we have is: when we try to update the broken record, it actually created another submission and that new submission works fine for us, but unfortunately the older submission comes in active queue and we want to remove that buggy submission record altogether withtout any notification… hope this make sense.

This way we are populating our old record, so someone we can run from phpmysql/sql query so we may remove specific submission id from any user (obviously users may have several or one submissions), so query should act only to the submission we want with submission id number we usually see in admin area under submission section. Thank you once again. I think tthis query will help us a lot.

Hi @doneforyou

You can’t really delete submissions using phpMyAdmin. There are too many places where submissions are referenced (authors, queries, notes, files, review rounds, etc) and in OJS3 there is also referential integrity and foreign keys used on the files/submission_files tables. If you must delete submissions, then do so in your 3.2.1 version where you can still do it in the dashboard.

Best
Jason

@jnugent so either I have to bear or ask my host to give us shell access so we may use putty or any tool to login and run script for each submisaion to delete it?

Yes, the command line tool is designed to ensure that submissions are properly cleaned up when removed. Stale records can break future upgrades.

@jnugent perfect, my last question, when we run command lime tool to remove submisaion, would thia trigger any email or alert to any one like author esitor or admin

We will next continue with clean subdomain imstallation :innocent:

No, it will not. The tool just deletes the submission.

@jnugent finally a happy ending, thanks for your time

@jnugent but the user and his other submissions will be intact, it only removes the submission number we provide one by one

Yes, it only removes the single submission.

1 Like

@jnugent sorry to reopen and bug you again

Here is what I have seen afte running command line tools… it removes the submission id, fine… but it does not delete the folder, even fine too if this is not really important since I can remove that manually… but let me know what you are expecting with following error:

[20-Sep-2021 15:17:18 America/Chicago] PHP Fatal error: Uncaught Error: Call to a member function getUsername() on null in /home1/show/public_html/lib/pkp/classes/services/PKPSubmissionFileService.inc.php:597
Stack trace:
#0 /home1/show/public_html/lib/pkp/classes/submission/PKPSubmissionDAO.inc.php(129): PKP\Services\PKPSubmissionFileService->delete(Object(SubmissionFile))
#1 /home1/show/public_html/classes/submission/SubmissionDAO.inc.php(51): PKPSubmissionDAO->deleteById(‘232’)
#2 /home1/show/public_html/tools/deleteSubmissions.php(56): SubmissionDAO->deleteById(‘232’)
#3 /home1/show/public_html/tools/deleteSubmissions.php(62): SubmissionDeletionTool->execute()
#4 {main}
thrown in /home1/show/public_html/lib/pkp/classes/services/PKPSubmissionFileService.inc.php on line 597

[20-Sep-2021 15:27:30 America/Chicago] PHP Fatal error: Uncaught Error: Call to a member function getUsername() on null in /home1/show/public_html/lib/pkp/classes/services/PKPSubmissionFileService.inc.php:597
Stack trace:
#0 /home1/show/public_html/lib/pkp/classes/submission/PKPSubmissionDAO.inc.php(129): PKP\Services\PKPSubmissionFileService->delete(Object(SubmissionFile))
#1 /home1/show/public_html/classes/submission/SubmissionDAO.inc.php(51): PKPSubmissionDAO->deleteById(‘229’)
#2 /home1/show/public_html/tools/deleteSubmissions.php(56): SubmissionDAO->deleteById(‘229’)
#3 /home1/show/public_html/tools/deleteSubmissions.php(62): SubmissionDeletionTool->execute()
#4 {main}

These are probably just files that no longer have a valid user associated with them. Probably safe to ignore, if the file is removed from the database. You could probably find these with:

SELECT * FROM submission_files WHERE uploader_user_id NOT IN (SELECT DISTINCT user_id FROM users);

If that returns nothing then you should be fine.

@jnugent exactly we have problem with those submission where they dont have any author associated or altogether no file no author but simply submission record, but folder presend on disk with no final file… should I still test the query?