Closed NelsonPereira1991 closed 7 years ago
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.
Dendro Version if known (or site URL)
https://github.com/feup-infolab/dendro/tree/machine-plus-human-identifiers
In the commit
https://github.com/feup-infolab/dendro/commit/af992a5bff4328d49a0637bf20bcea71979efd45
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.