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
API: Add submission with non existing sectionId
results Fatal Error
#9471
Comments
@asmecher I have added PRs for this issue for review. |
@defstat, will this work with OMP, where series are optional? |
@asmecher given that the section related code is already in place at the PKP-LIB level here, OMP is already taken into account. The |
That makes sense, @defstat, thanks. I've merged to |
Ι have no strong opinion on that. It seems that this is not widely reported, so we could leave it unmerged for the stable branch and revisit it if a related issue/need comes up |
Makes sense to me, thanks! |
Describe the bug
If a user tries to call the
add
endpoint of thesubmission
API providing asectionId
that can't be found in the DB, a fatal error is producedTo Reproduce
Steps to reproduce the behavior:
POST http://localhost:8000/index.php/publicknowledge/api/v1/submissions with following data
What application are you using?
OJS, OMP or OPS version 3.4
Additional information
PKPSubmissionHandler
=>add
function does not check if the$section = Repo::section()->get($sectionId, $context->getId());
is returning a validsection
entity. Should check and add a validation error.PRs
Branch
stable-3_4_0
PKP-LIB: #9472
OJS: pkp/ojs#4192 TESTS ONLY
Branch
main
PKP-LIB: #9473
OMP: pkp/omp#1526 TESTS ONLY
The text was updated successfully, but these errors were encountered: