Closed drh-stanford closed 3 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?
@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']
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.
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).
Just following up on this, it looks like the record in questions is rendering correctly now
Do we have another example of this issue coming up or should we close this out?
Hmmm. It's still busted for me on the show page.
@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.
See https://github.com/ebsco/edsapi-ruby/issues/80
Sometimes the subjects are present, but shown as blanks: