-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cancelling revision upload removes the original file #8933
Comments
The logic behind file revisions handling in the file upload wizard works as per documentation: 1) when a new revision is uploaded, new entry is added in the pkp-lib/classes/submissionFile/Repository.php Line 492 in 9c6f915
The solution (considering the stage of the dev cycle) could be passing additional parameter to |
PRs Also requires backporting to the stable branch |
@NateWr, can you take a look? According to my tests on cancelling file upload, this PR does the trick. Cancelling the wizard updates the submission file, so it points to the original entry in the Do I need additional steps to validate the data regarding original file when passing it to the new endpoint in |
Watch out for: #8389 as it also touches event log, either PR should be modified depending on what is merged first |
pkp/pkp-lib#8933 refactor event log
pkp/pkp-lib#8933 refactor event log
Merged |
🎆 🎆 🎆 Thanks, @Vitaliy-1! |
@Vitaliy-1, heads-up that the |
Thanks! Forgot to revert changes on that line. Ideally, |
Hi, In my allowedUploads plugin the hook is used and the plugin tries to add an error here: However, this leads to a weird error where I see a javascript in a dialog box and the upload forms opens again inside itself. This is in 3.4 stable. I think when I released the current version of the plugin back in early 2023 this worked so trying to figure out what changed. The validation method is identical with https://github.com/pkp/controlPublicFiles/blob/main/ControlPublicFilesPlugin.php#L218 edit: added to dev channel as well... |
Describe the bug
From the forum: https://forum.pkp.sfu.ca/t/bug-when-canceling-file-revision-in-omp/77900
Related to file upload wizard in general. When uploading a new submission file revision, there is an option to cancel the upload. If the file is already uploaded, pressing
Cancel
button deletes also original fileTo Reproduce
Steps to reproduce the behavior:
Submission Files
click onUpload File
Upload File
and select file from the system to uploadCancel
buttonWhat application are you using?
OJS, OMP and OPS 3.4/stable 3.3.0
Additional information
When revision is uploaded it replaces the previous submission file:
pkp-lib/controllers/wizard/fileUpload/form/SubmissionFilesUploadForm.php
Line 194 in 9c6f915
Pressing
Cancel
triggersdeleteFile
operation on the correspondent submission file, which also removes both entries infiles
table, original and a new (revised) oneThe text was updated successfully, but these errors were encountered: