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

[BUG] Dendro does not save the descriptor "bdv:coupledResource" when the value is "test data" (a string with spaces) #278

Closed
NelsonPereira1991 opened this issue Nov 8, 2017 · 2 comments
Assignees

Comments

@NelsonPereira1991
Copy link
Collaborator

Dendro Version if known (or site URL)

https://github.com/feup-infolab/dendro/tree/machine-plus-human-identifiers

In the commit

af992a5

Please describe the expected behaviour

Should report an error, identifying that the type of the value filed in for the descriptor "bdv:coupledResource" is not valid (should be a resource in this case)

Please describe the actual behaviour

Dendro halts for a bit, but then responds with a status of "ok", althought the descriptor is not saved.

What steps can be taken to reproduce the issue?

Create a folder/file in Dendro then fill the descriptor "Coupled Resource" from the "Biodiversity evolution studies" ontology with the value "test Data". Then try to save it.

Possible ways to fix the problem (programmers)

Add validations in the backend testing the value types when updating metadata for a resource.

@silvae86
Copy link
Member

silvae86 commented Nov 8, 2017

This is really a bug. It is a question of validating the values of the resource properties when they are of the "resource" type. All values of this type must be valid URIs (use URI.js) (to validate at the resource.js level), while the metadata editing should enforce that all values should be URLs (using validator.js). The point is that not every URI is an URL but every URL is an URI. Validations in resource.js should therefore be less restrictive than those in the records.js controller.

@NelsonPereira1991
Copy link
Collaborator Author

Fixed in #280

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

No branches or pull requests

2 participants