Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exhibits/prod] Riiif::ImageNotFoundError: unable to find file for 1238 #688

Closed
mejackreed opened this issue Oct 5, 2017 · 4 comments
Closed
Assignees
Labels

Comments

@mejackreed
Copy link
Contributor

Backtrace

View full backtrace and more info at honeybadger.io

@jkeck
Copy link
Contributor

jkeck commented Nov 1, 2017

The remediation required to accomplish #768 did not end up addressing this issue (although I think they're both symptoms of the upload issues we were getting pre-IIIF).

I believe we could clean these up by finding all of the Spotlight::FeaturedImage classes whose mounted image's file is nil (unfortunately not a good way to query so we would have to iterate over all 2,558 featured image objects) and remove it as well as either the Exhibit, Page, or Browse Category that it was the associated thumbnail or masthead for.

This totally untested code might be around what we would want:

Spotlight::FeaturedImage.find_each |fi|
  # TODO: need to account for when there is no file but a IIIF tilesource/region is set.
  next if fi.image && fi.image.file # only continue if there is NOT a file

  if Spotlight::Exhibit.exists?(thumbnail_id: fi.id)
    Spotlight::Exhibit.where(thumbnail_id: fi.id).destroy_all
  elsif Spotlight::Exhibit.exists?(masthead_id: fi.id)
    Spotlight::Exhibit.where(masthead_id: fi.id).destroy_all
  elsif Spotlight::Page.exists?(thumbnail_id: fi.id)
    Spotlight::Page.where(thumbnail_id: fi.id).destroy_all
  elsif Spotlight::Search.exists?(thumbnail_id: fi.id)
    Spotlight::Search.where(thumbnail_id: fi.id).destroy_all
  elsif Spotlight::Search.exists?(masthead_id: fi.id)
    Spotlight::Search.where(masthead_id: fi.id).destroy_all
  end
end

@corylown
Copy link
Contributor

corylown commented Jul 3, 2024

This may still be a problem, see more recent honeybadger alerts:

https://app.honeybadger.io/projects/49092/faults/104685469
https://app.honeybadger.io/projects/49092/faults/106776014

@corylown corylown added the bug label Jul 3, 2024
@github-project-automation github-project-automation bot moved this to Maintenance or dev-specific - will need dev help to prioritize in Cathy's Exhibits WC planning for 2024 Aug 26, 2024
@dnoneill dnoneill self-assigned this Oct 17, 2024
@dnoneill
Copy link
Contributor

Believe to be related to projectblacklight/spotlight#3201. At least from what I can tell right now, this is the error that is causing the images to not load correctly in the thumbnail

@dnoneill
Copy link
Contributor

Or maybe not. I looked at the honeybadger errors. It looks to me like a bot. The URLs aren't formed correctly. The urls being looked at are https://exhibits.stanford.edu/images/1152/0,0,1,0/400,300/0/default.jpg

The default format of an image that has been uploaded tends to be a lot longer, like https://exhibits.stanford.edu/images/9306-2a1cb57782fefab503b3d169328f869b/0,0,1012,1012/400,400/0/default.jpg. Also the region is weird (0,0,1,0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Maintenance or dev-specific - will need dev help to prioritize
Development

No branches or pull requests

5 participants