Skip to content
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

Plugin callback is triggered every time submission step 4 is displayed #18

Closed
ewhanson opened this issue Jan 26, 2022 · 7 comments
Closed

Comments

@ewhanson
Copy link
Contributor

Description of the issue

The plugin callback that is responsible for submitting submission data to iThenticate is currently triggered by the submissionsubmitstep4form::display hook. This can result in the plugin callback being called multiple times for the same submission whenever the confirmatory submission step 4 is displayed. This may happen if the user refreshes the page or if they go back and edit previous steps and then return to step 4.

Duplicate submissions to iThenticate has come up a few times recently, first from a PKP PS client in December 2021 where a local customization was made to change this behaviour along with other minor changes; second via a report from Kathleen Luschek at Crossref, citing reports from users indicating they were also experiencing duplicate submissions to iThenticate.

Proposed solution

I've tested a fix for this by changing the hook that triggers the plugin callback from submissionsubmitstep4form::display to submissionsubmitstep4form::execute so the submission is only sent to iThenticate once when the OJS submission process is finalized. @asmecher, does this sound like a reasonable approach?

Kathleen also reported that she had heard from users that "their submissions are being duplicated, and these duplicates aren't being picked up by Turnitin because the plugin is creating a different folder for each submission." This approach doesn't change how anything to do with folders are handled and may be an unrelated issue.

@asmecher
Copy link
Member

No objection to changing the callback from the step 4 display to the step 4 execute. See also #13; a proper solution to this will have to wait until 3.4.x, when we'll have a proper queue setup for offline batch processing.

ewhanson added a commit to ewhanson/plagiarism that referenced this issue Jan 27, 2022
ewhanson added a commit to ewhanson/plagiarism that referenced this issue Jan 27, 2022
@ewhanson
Copy link
Contributor Author

Thanks, that sounds good. I've created a PR, and once this is merged, can update the plugin gallery as well if you'd like.

PR: #19

@asmecher
Copy link
Member

Have you tested it? Looks fine to me, but if you haven't, it would be good to give it a spin before deploying.

@ewhanson
Copy link
Contributor Author

Yep, I've tested it locally, and it's working as expected (only triggering upon submission of the step 4 form).

@asmecher
Copy link
Member

Great! Please go ahead, and an update to the Plugin Gallery would be welcome too.

@ewhanson
Copy link
Contributor Author

I just remembered/realized I won't be able to make the release/merge the change. Would you be able to merge #19? After that I'll follow up with an update to the plugin gallery repo. Thanks!

asmecher added a commit that referenced this issue Jan 27, 2022
#18 Plugin callback is triggered every time submis…
@asmecher
Copy link
Member

Of course, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants