sul-dlss / SearchWorks

SearchWorks (Stanford University Libraries)
http://searchworks.stanford.edu
Other
48 stars 10 forks source link

subjects are blank sometimes #1791

Closed drh-stanford closed 3 years ago

drh-stanford commented 7 years ago

See https://github.com/ebsco/edsapi-ruby/issues/80

Sometimes the subjects are present, but shown as blanks:

screen shot 2017-09-15 at 9 54 31 am

bmckinney commented 7 years ago

There is no guarantee that seachLinks will be present. This can vary from database publisher to database publisher.

Is there something in the presenter logic that prevents subjects from being displayed without searchLink tags?

drh-stanford commented 7 years ago

@bmckinney Yes, it assumes that it's HTML that it can parse. See https://github.com/sul-dlss/SearchWorks/blob/master/app/models/concerns/eds_subjects.rb#L71-L76

Can we wrap plain subjects into <searchLink>'s, or return them as an array rather than faux-HTML with <br>'s? The code already handles the latter case -- see https://github.com/sul-dlss/SearchWorks/blob/master/app/models/concerns/eds_subjects.rb#L68

That is,

eds_subjects: '<searchLink ...>subject</searchLink><br/><searchLink...>subject</searchLink>'

or for non-searchLink subjects

eds_subjects: ['subject', 'subject']
bmckinney commented 7 years ago

Ah, so it's not so much HTML parsing in general, rather the purpose is to use searchLink tags to create an array of subjects.

We should meet with @efrierson to revisit/rethink how the gem delivers subjects.

drh-stanford commented 7 years ago

Yes, I'm assuming that any subject has the metadata that a <searchLink> provides. So, I prefer if the gem inject a searchLink if one isn't present (i.e., it's a simple subject term).

jkeck commented 7 years ago

Just following up on this, it looks like the record in questions is rendering correctly now

aph__77874260

Do we have another example of this issue coming up or should we close this out?

drh-stanford commented 7 years ago

Hmmm. It's still busted for me on the show page.

screen shot 2017-09-25 at 10 28 07 am

efrierson commented 3 years ago

@cbeer @camillevilla per our conversation - i've published the ebsco-eds 1.1.3 gem that will hopefully resolve the HAPI missing subject headings. It did end up being in the gem, not in the data. The other two are data issues further upsteam, so no other gem updates are expected to resolve those.