Bug #7000
closedMetadataView.js?v=1.11.0:154 Uncaught TypeError: viewRef.model.get is not a function
0%
Description
I've been able to produce this a couple of times with some of my recent, weird resource maps. Here's a reproducible-ish bug report:
What I did: (using dev.nceas' Metacat)
- Inserted an EML metadata object
- Inserted a resource map aggregating that metadata object
What I expected:
- The UI to show a standard EML and data table for the metadata file
What happened instead:
- The spinner spun indefinitely and I received the following error in the JS console:
MetadataView.js?v=1.11.0:154 Uncaught TypeError: viewRef.model.get is not a function
Here's the resource map. Those PIDs exist on dev.nceas so you can check them out.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix provone: <http://purl.dataone.org/provone/2015/01/15/ontology#> . @prefix ore: <http://www.openarchives.org/ore/terms/> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix dc: <http://purl.org/dc/elements/1.1/> . @prefix cito: <http://purl.org/spar/cito/> . @prefix dcterms: <http://purl.org/dc/terms/> . <https://cn.dataone.org/cn/v2/resolve/resourceMap_urn%3Auuid%3A5c964418-8c24-4855-9172-3f1c5c5507f4> dcterms:identifier "resourceMap_urn:uuid:5c964418-8c24-4855-9172-3f1c5c5507f4"^^<http://www.w3.org/2001/XMLSchema#string> ; ore:describes <https://cn.dataone.org/cn/v2/resolve/resourceMap_urn%3Auuid%3A5c964418-8c24-4855-9172-3f1c5c5507f4#aggregation> ; a ore:ResourceMap . <https://cn.dataone.org/cn/v2/resolve/resourceMap_urn%3Auuid%3A5c964418-8c24-4855-9172-3f1c5c5507f4#aggregation> dc:title "DataONE Aggregation" ; ore:aggregates <https://cn.dataone.org/cn/v2/resolve/urn%3Auuid%3A5c964418-8c24-4855-9172-3f1c5c5507f4> ; a ore:Aggregation . <https://cn.dataone.org/cn/v2/resolve/urn%3Auuid%3A5c964418-8c24-4855-9172-3f1c5c5507f4> dcterms:identifier "urn:uuid:5c964418-8c24-4855-9172-3f1c5c5507f4"^^<http://www.w3.org/2001/XMLSchema#string> ; ore:isAggregatedBy <https://cn.dataone.org/cn/v2/resolve/resourceMap_urn%3Auuid%3A5c964418-8c24-4855-9172-3f1c5c5507f4#aggregation> .
The index shows that the metadata PID doesn't have a "documents" index entry (expected).
Updated by Bryce Mecum over 8 years ago
And I meant to add, the metadata PID's entry in Solr does NOT have a resourceMap index field as I expected.
Updated by ben leinfelder over 8 years ago
If memory serves me, I'm not sure we support OREs without data objects in them. Our thinking was probably along the lines of "what's the point? there's just a metadatafile".
If you skip the ORE and just have the metadata document, I bet it renders pretty well, though not exactly like other packages that include metadata and data.
Updated by Lauren Walker over 8 years ago
We can display an "empty data set" somehow. These cases should be rare but the app should at least display something.
Example: https://dev.nceas.ucsb.edu/#view/resourceMap_urn%3Auuid%3A5c964418-8c24-4855-9172-3f1c5c5507f4
Updated by Lauren Walker over 8 years ago
- Assignee set to Lauren Walker
- Target version set to 1.11.1
Updated by Lauren Walker over 8 years ago
- Status changed from New to Resolved
This error is caused when navigating to the Metadata view via a pid that:
- is an empty resource map
- is a data object with no documenting metadata
- is a resource map with no metadata
The Metadata View will now display the best info it can (package contents table, index values, and a message that there is no metadata).