scientist-softserv / utk-hyku

Other
6 stars 0 forks source link

Rails / View Error occurring when Removing and Rebuilding Intermediate Files for PDF Works #614

Open markpbaggett opened 6 months ago

markpbaggett commented 6 months ago

Story

When we remove and rebuild a fileset that is an OBJ on a PDF work a view error is occurring that is related to iiif_print.

Here is an example where you can see this: 9f89d0f4-ad1f-43cf-8558-f0101a1cdb72

Acceptance Criteria

Trace: ```log I, [2024-03-05T17:28:32.531856 #1] INFO -- : [fc8870020070cb30d91b5c436bdbc1ca] Rendered /usr/local/bundle/bundler/gems/iiif_print-5c5fa6880b3d/app/views/hyrax/file_sets/_show_actions.html.erb (1890.4ms) I, [2024-03-05T17:28:32.531991 #1] INFO -- : [fc8870020070cb30d91b5c436bdbc1ca] Rendered hyrax/file_sets/show.html.erb within layouts/hyrax/1_column (1894.5ms) I, [2024-03-05T17:28:32.532238 #1] INFO -- : [fc8870020070cb30d91b5c436bdbc1ca] Completed 500 Internal Server Error in 2085ms (ActiveRecord: 7.1ms) D, [2024-03-05T17:28:32.534870 #1] DEBUG -- : [fc8870020070cb30d91b5c436bdbc1ca] Account Load (0.6ms) SELECT "public"."accounts".* FROM "public"."accounts" WHERE "public"."accounts"."tenant" = $1 LIMIT $2 [["tenant", "public"], ["LIMIT", 1]] I, [2024-03-05T17:28:33.526010 #1] INFO -- : [fc8870020070cb30d91b5c436bdbc1ca] Sending event dbffa6e566dd4b11a206bb4e61d56008 to Sentry F, [2024-03-05T17:28:33.626072 #1] FATAL -- : [fc8870020070cb30d91b5c436bdbc1ca] 2024-03-05T17:28:33.626198286Z F, [2024-03-05T17:28:33.626141 #1] FATAL -- : [fc8870020070cb30d91b5c436bdbc1ca] ActionView::Template::Error (undefined local variable or method `iiif_print' for #<#:0x00007f9a4c83fc50>): 2024-03-05T17:28:33.626319305Z F, [2024-03-05T17:28:33.626263 #1] FATAL -- : [fc8870020070cb30d91b5c436bdbc1ca] 15: <% end %> 2024-03-05T17:28:33.626362438Z [fc8870020070cb30d91b5c436bdbc1ca] 16: 2024-03-05T17:28:33.626371480Z [fc8870020070cb30d91b5c436bdbc1ca] 17: <% if @presenter.editor? && @presenter.pdf? %> 2024-03-05T17:28:33.626385239Z [fc8870020070cb30d91b5c436bdbc1ca] 18: <%= link_to t("iiif_print.file_set.split_this"), iiif_print.split_pdf_path(@presenter), 2024-03-05T17:28:33.626389270Z [fc8870020070cb30d91b5c436bdbc1ca] 19: class: 'btn btn-default', data: { confirm: t("iiif_print.file_set.confirm_split_this") }, [fc8870020070cb30d91b5c436bdbc1ca] 20: method: :post %> 2024-03-05T17:28:33.626396881Z [fc8870020070cb30d91b5c436bdbc1ca] 21: <% end %> 2024-03-05T17:28:33.626400226Z F, [2024-03-05T17:28:33.626286 #1] FATAL -- : [fc8870020070cb30d91b5c436bdbc1ca] 2024-03-05T17:28:33.626413047Z F, [2024-03-05T17:28:33.626311 #1] FATAL -- : [fc8870020070cb30d91b5c436bdbc1ca] app/views/hyrax/file_sets/show.html.erb:8:in `_app_views_hyrax_file_sets_show_html_erb__4390702108281311460_609280' 2024-03-05T17:28:33.626420803Z [fc8870020070cb30d91b5c436bdbc1ca] lib/omni_auth/strategies/saml_decorator.rb:28:in `other_phase' 2024-03-05T17:28:33.626424129Z [fc8870020070cb30d91b5c436bdbc1ca] app/middleware/no_cache_middleware.rb:13:in `call' 10.0.4.228 - - [05/Mar/2024:17:28:33 +0000] "GET /500?locale=en HTTP/1.1" 500 1477 3.2859 I, [2024-03-05T17:28:33.725407 #1] INFO -- : Finished "/notifications/endpoint/" [WebSocket] for 10.0.5.240 at 2024-03-05 17:28:33 +0000 I, [2024-03-05T17:28:33.725627 #1] INFO -- : Hyrax::NotificationsChannel stopped streaming from hyrax:notifications:Z2lkOi8vaHlrdS9Vc2VyLzEz ```

Testing Instructions and Sample Files

jillpe commented 5 months ago

SoftServ QA: ✅

Fileset

Image

markpbaggett commented 5 months ago

Not sure how to test on staging so bumping forward.

markpbaggett commented 5 months ago

This looks good. :tada: