locdb / locdb-frend

Fr(ont-)end for the Linked Open Citation Database.
https://locdb.github.io
GNU General Public License v3.0
6 stars 2 forks source link

Cannot "add entry" to reference list #442

Open LauraErhard opened 5 years ago

LauraErhard commented 5 years ago

I just tried to add another entry to a reference list and I see this after clicking add entry: addentry This can't be right. I would expect that I only get the second form.

I don't know if the 400 error that follows my submit is a consequential error of the first problem but here is the error:

Error creating entry 
Object { headers: {…}, status: 400, statusText: "Bad Request", url: "https://locdb.bib.uni-mannheim.de/locdb/bibliographicEntries?bibliographicResourceId=5a2175daa2bb9026f446e2bb", ok: false, name: "HttpErrorResponse", message: "Http failure response for https://locdb.bib.uni-mannheim.de/locdb/bibliographicEntries?bibliographicResourceId=5a2175daa2bb9026f446e2bb: 400 Bad Request", error: {…} }
chah3d commented 5 years ago

The double form is fixed for the next version. The creation of a new entry on the post bibliographicEntry interface still raises a validation error. selection_029 (Resource id/Query string: 5bc6f1700e466f16dff1c0b7) It seems like the validation of the Entry ID (according to the pattern) fails because it does not exist. Are there other attributes that are mandatory for the creation of a new entry, so we can catch faulty entries before transmission? (At the moment even an empty entry can be created which may be of limited use)

LauraErhard commented 5 years ago

Should I see any changes yet in any of our systems? The only thing I see is in the dev version I still get the double form and strange additional text at the beginning of the page: unbenannt EDIT: I just noticed that the additional text is at the beginning of every edit form/page not just the add new entry to reference list edit page.

lgalke commented 5 years ago

@chah3d does it make sense to deploy a new version on dev | on prod? @abdelqader-mohammad I could do it you want me to.

abdelqader-mohammad commented 5 years ago

I can't see the unwanted text at the beginning. I have two forms (one for Edit and the other for Create).

image image

@lgalke you can do it, please

lgalke commented 5 years ago

I pushed a fix and deployed it on dev and prod. @abdelqader-mohammad the debug information was only shown at dev endpoint. I also now disabled it, there.

lgalke commented 5 years ago

2416ed4d2fdbba0443fa44bc405fcddcda68c6b0

LauraErhard commented 5 years ago

Thanks for your quick work, everything looks good now.

But I can't submit the new entry, I always get the following error:

Error creating entry Object { headers: {…}, status: 400, statusText: "Bad Request", url: "https://locdb.bib.uni-mannheim.de/locdb/bibliographicEntries?bibliographicResourceId=5a548f95fcaa4703f0194ec1", ok: false, name: "HttpErrorResponse", message: "Http failure response for https://locdb.bib.uni-mannheim.de/locdb/bibliographicEntries?bibliographicResourceId=5a548f95fcaa4703f0194ec1: 400 Bad Request", error: {…} }

EDIT: I only filled out the category "raw text", are there any mandatory fields I should have filled out?

lgalke commented 5 years ago

We call the entry.create service from the backend. Inspecting the error message, it is caused by a spurious validation check that enforces the 'references' field to be filled with some id.

See the screenshot: image

Of course that should not happen at that point, @anlausch needs to tackle this.