informatics-isi-edu / chaise

An adaptive user interface for the Deriva platform.
https://www.isi.edu/isr/
Apache License 2.0
9 stars 6 forks source link

Multi-edit with implicit schema fails during submit #1914

Closed karlcz closed 4 years ago

karlcz commented 4 years ago

If you go to a recordedit URL without an explicit schema name, the app mostly functions except for multi-record edit submission.

  1. Go to a table without schema name, e.g. https://synapse-dev.isrd.isi.edu/chaise/recordset/#1/AuthorList_Author
  2. Select bulk edit button
  3. Make some edits
  4. Hit submit

An error banner is displayed Schema null does not exist. Doing the same flow for a single-record edit will succeed, so it seems to be multi-record specific code...

I wonder if the application should just normalize the URL during startup, finding the implicit schema and adding the missing schema name qualifier to the location bar and other app state?

RFSH commented 4 years ago

The Reference.update API in ermrestjs was using the wrong Reference.location.schemaName value which might be null. I changed it to use the correct Reference.table.schema.name instead. The edit should now work properly. The other parts of ermrestjs are using the correct API, so there wasn't any need for further changes.

@karlcz can you please try this again and verify the fix?