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

Change OJS Hook used for adapting submission step 3. Enter Metadata #13

Open
2 tasks
tomniers opened this issue Jun 4, 2021 · 1 comment
Open
2 tasks

Comments

@tomniers
Copy link
Collaborator

tomniers commented Jun 4, 2021

Beware that the Publication::edit hook will fire any time the publication is edited, not just in step 3. So you’ll need to be careful about when you are performing the action to make.

An alternate hook that you can use is submissionsubmitstep3form::execute. This will fire whenever the step 3 form is successfully completed.

https://forum.pkp.sfu.ca/t/set-file-to-create-galley-by-plugin/67084/11?u=tnier01

  • loop which checks if the ERC is already a candidate or already published, so that the whole function (updateCompendium) is not executed several times and that there are not two ERCs on the same workspace.zip
  • check that only one compendium per submission is allowed ? (solution for both could be if the ERC id is entered in the database so not equal to null, no further ERC can be created)
@tomniers
Copy link
Collaborator Author

tomniers commented Mar 14, 2022

After just trying out using the hook submissionsubmitstep3form::execute instead of Publication::edit for the function updateCompendiumit became clear that it is not usable in our case, as then the both galleys are not created. Either I am missing something or it is simply not usable in our use case.
Nevertheless there needs to be a if loop which checks if the ERC is already a candidate or already published, so that the whole function is not executed several times.

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

1 participant