OD2 icon indicating copy to clipboard operation
OD2 copied to clipboard

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

Open KevinJonesMeta opened this issue 1 year ago • 10 comments

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

KevinJonesMeta avatar Nov 30 '23 17:11 KevinJonesMeta

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.

wickr avatar Dec 27 '23 01:12 wickr

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 avatar Sep 03 '24 18:09 KevinJonesMeta

Another subject example. Jerimiah Bonifer Oral History Transcript.

KevinJonesMeta avatar Sep 03 '24 18:09 KevinJonesMeta

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.

KevinJonesMeta avatar Sep 03 '24 19:09 KevinJonesMeta

@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:

  • Entity page URL: https://www.wikidata.org/wiki/Q7278075
  • Entity URI: http://www.wikidata.org/entity/Q7278075

briesenberg07 avatar Sep 04 '24 16:09 briesenberg07

@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.

KevinJonesMeta avatar Sep 04 '24 16:09 KevinJonesMeta

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

briesenberg07 avatar Sep 04 '24 17:09 briesenberg07

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?

briesenberg07 avatar Sep 04 '24 17:09 briesenberg07

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.

KevinJonesMeta avatar Sep 04 '24 17:09 KevinJonesMeta

Very strange!

briesenberg07 avatar Sep 04 '24 17:09 briesenberg07