OregonDigital / OD2

Next generation of Oregon Digital ( https://oregondigital.org ) digital collections platform, built on Samvera Hyrax ( https://github.com/samvera/hyrax/ )
19 stars 1 forks source link

New Wikidata URIs in Subject Not Saved and Label Not Displayed on Existing Works #2996

Closed KevinJonesMeta closed 2 weeks ago

KevinJonesMeta commented 11 months ago

Descriptive summary

New wikidata URIs are not being saved and the label is not fetching in work form in Subject on existing works. Wikidata URIs already ingested (at migration?) on works appear to be saved but are not displaying labels or are displaying them inconsistently (haven't seen enough works to know yet). Example URI - https://www.wikidata.org/wiki/Q7278075.

Expected behavior

Wikidata URIs in Subject field are saved through work form and fetch label that is displayed on work after saving.

Related work

Link to related tickets or prior related work here.

Accessibility Concerns

Add any information here to indicate any known or suspected accessibility issues for this ticket

wickr commented 10 months ago

The example URI is a wikidata URI but not the 'Concept URI'. The http version of that URI works.

Fetch gives an error on parsing but still pulls the label:

irb(main):314:0> sub = OregonDigital::ControlledVocabularies::Subject.new('http://www.wikidata.org/entity/Q7278075')
=> #<OregonDigital::ControlledVocabularies::Subject:0x4dbc64 ID:<http://www.wikidata.org/entity/Q7278075>>

irb(main):315:0> sub.fetch
I, [2023-12-27T01:31:04.171183 #4826]  INFO -- : Attempting to fetch http://www.wikidata.org/entity/Q7278075 from local graph cache.
[INFO] fetch_cached_graph(http://www.wikidata.org/entity/Q7278075) not found in triplestore cache (http://blazegraph.od2-prod.svc.cluster.local.:8080/bigdata/namespace/kb/sparql)
I, [2023-12-27T01:31:04.175348 #4826]  INFO -- : Fetching http://www.wikidata.org/entity/Q7278075 from the authorative source. (this is slow)
[INFO] fetch_cached_graph(http://www.wikidata.org/entity/Q7278075) not found in triplestore cache (http://blazegraph.od2-prod.svc.cluster.local.:8080/bigdata/namespace/kb/sparql)
ERROR <http://www.wikidata.org/entity/Q7278075>document/RDF/Description: nodeID addtribute '0b8bd71b926a65ca3fa72e5d9103e4d6' must be an XML Name
I, [2023-12-27T01:31:05.625724 #4826]  INFO -- : Fetched From Source
=> #<RDF::Graph:0x4dcd6c(default)>

irb(main):316:0> sub.solrize
=> ["http://www.wikidata.org/entity/Q7278075", {:label=>"RV Wecoma$http://www.wikidata.org/entity/Q7278075"}]

Maybe it's fine with the Concept URI - I tried creating a new work and adding a Subject and the form showed the label.

Kevin if you have other examples of the Concept URI versions not working let me know.

KevinJonesMeta commented 1 month ago

This is an example that has a wikidata URI not found in 'Subject' field: John Byrne Oral History Interview Recording (3 of 4) . I'll use 'http' until further notice for Wikidata. @wickr can you confirm that's best until there is time for this ticket? I'll look for more examples from Subject field.

KevinJonesMeta commented 1 month ago

Another subject example. Jerimiah Bonifer Oral History Transcript.

KevinJonesMeta commented 1 month ago

Correcting wikidata URIs with 'http' in 'Interviewee' field are saved and display. Corrections to wikdiata URIs with 'http' in 'Subject' field are not saved nor display so far through work form in Oral Histories at Oregon State University Libraries collection.

briesenberg07 commented 1 month ago

@KevinJonesMeta has above:

Example URI - https://www.wikidata.org/wiki/Q7278075.

If you are retrieving Wikidata URIs from a browser, the URL in the address bar is not the entity URI.

image

Get the entity URI using the "Concept URI" link > right-click > "Copy link address" or similar:

image

Compare:

KevinJonesMeta commented 1 month ago

@briesenberg07 Yes, I know. changing 'wiki' to 'entity' is documented in our how-to guides and the other examples above use the concept URIs on the records. I can't remember at the moment why I provided the URL in the ticket. Probably a mistake.

briesenberg07 commented 1 month ago

Sorry @KevinJonesMeta ! Saw your example at the top and thought it worth confirming that. Thanks for letting me know

briesenberg07 commented 1 month ago

If you are grabbing URLs from the browser and swapping wiki for entity, but concept URIs use http while page URLs are https, was this part of the problem?

KevinJonesMeta commented 1 month ago

I've tried http and https in Subject field and neither is consistently working. http works in other fields thus far but I haven't tested every field yet.

briesenberg07 commented 1 month ago

Very strange!