-
Notifications
You must be signed in to change notification settings - Fork 93
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
Vocabulary search using "0" as the query argument throws an error #1260
Comments
I think your analysis of the problem is spot-on @Ohiekkar ! See linked PR for a tentative fix. Thanks! |
Thanks for the report @Ohiekkar, and the quick confirmation and PR @kinow! I believe this affects not just the REST API but also the search in the web UI. Example:
|
The REST side was fixed in PR #1261 but the web UI search still suffers from the same problem (see above comment). I'm reopening this issue to keep track of the problem on the web UI side. |
Like @Ohiekkar mentioned above, the problem stems from PHP evaluating Skosmos/controller/RestController.php Line 178 in 21796ca
to this: Skosmos/controller/RestController.php Line 178 in 52e7079
Now a similar problem still exists on the web UI side - we need to avoid evaluating I suspect that at least this test in ConceptSearchParameters needs to be changed as Skosmos/model/ConceptSearchParameters.php Line 71 in 52e7079
|
At which URL did you encounter the problem?
https://api.finto.fi/rest/v1/ykl/search
What steps will reproduce the problem?
What is the expected output? What do you see instead?
As searching by notation is a thing and 0 is a valid notation I would expect the search to work and find this item: http://urn.fi/URN:NBN:fi:au:ykl:0, just like it works with https://api.finto.fi/rest/v1/ykl/search?query=1.
Currently it throws
400 Bad Request : query parameter missing
. I'd assume this comes from php evaluating "0" to falseThe text was updated successfully, but these errors were encountered: