Error when IIIF video pages have nil thumbnail URL
Sentry Issue: CRDL-M
NoMethodError: undefined method `[]' for nil:NilClass (NoMethodError)
item[:thumbnail] = document.iiif_media_thumbnail_urls[idx] if document.iiif_media_thumbnail_urls[idx].present?
^^^^^
app/controllers/concerns/manifest_helper.rb:202:in `generate_video_item'
item[:thumbnail] = document.iiif_media_thumbnail_urls[idx] if document.iiif_media_thumbnail_urls[idx].present?
app/controllers/concerns/manifest_helper.rb:127:in `block in generate_items'
generate_video_item document, idx
app/controllers/concerns/manifest_helper.rb:122:in `each'
iiif_manifest_urls(document).each_with_index.map do |manifest_url, idx|
app/controllers/concerns/manifest_helper.rb:122:in `each_with_index'
iiif_manifest_urls(document).each_with_index.map do |manifest_url, idx|
app/controllers/concerns/manifest_helper.rb:122:in `each'
iiif_manifest_urls(document).each_with_index.map do |manifest_url, idx|
...
(78 additional frame(s) were not displayed)
I (Josh) resolved this for WALB by re-saving every item with media_thumbnail_url = ''
instead of nil
and reindexing afterward. (I did this from the rails console, but you could do the equivalent by just manually re-saving the page in meta. (In order to be 100% equivalent to the manual procedure, I also set fulltext and title to empty string instead of nil, but I don't think those were associated with any error.))