bcgov / BCHeritage

Branch level repository for documentation and product issues.
Apache License 2.0
4 stars 0 forks source link

Find bug causing relationships to not load #66

Closed bferguso closed 2 years ago

bferguso commented 2 years ago

Resource -> Resource relationships that are loaded via CSV cause the exception below in the UI when viewing the from Resource.

The same type of relationship created in the UI shows correctly

Need to determine cause and fix this issue.

Uncaught TypeError: self.value.subscribe is not a function
    ResourceInstanceSelectViewModel http://arches5.local/int/arches-fossils/media/js/viewmodels/resource-instance-select.js?_dc=6.0.1:240
    viewModel http://arches5.local/int/arches-fossils/media/js/views/components/widgets/resource-instance-multiselect.js?_dc=6.0.1:10
    c http://arches5.local/int/arches-fossils/media/packages/knockout/build/output/knockout-latest.js?_dc=6.0.1:88
    c http://arches5.local/int/arches-fossils/media/packages/knockout/build/output/knockout-latest.js?_dc=6.0.1:94
bferguso commented 2 years ago

This was caused by the JSON element not being an array in the CSV file. For example:

ResourceID,Collector
ffdc1aea-99bc-4cb7-ba5e-68a3e5565050,"[{""resourceId"" : ""6a10b2ca-e8d4-4f3d-bdc7-6238ec58826a"", ""ontologyProperty"" : ""http://www.cidoc-crm.org/cidoc-crm/P11_had_participant"", ""resourceXresourceId"" : """", ""inverseOntologyProperty"" : ""http://www.cidoc-crm.org/cidoc-crm/P11i_participated_in""}]"