scientist-softserv / adventist_knapsack

Apache License 2.0
1 stars 0 forks source link

Admin sets and collections inaccessible #225

Closed KatharineV closed 3 weeks ago

KatharineV commented 7 months ago

Double check to make sure the move to knapsack will not resolve this Update: CONFIRMED - this is not be resolved with knapsack

Summary

Newly created user collections and admin sets on both staging and production are inaccessible after creation and save. From the Collection list on the dashboard, when we click on the new admin set or collection to edit the back end, we get this error:

Image

The admin sets I created to test this error are here: Staging - https://adl.s2.adventistdigitallibrary.org/admin/admin_sets/f9c791d8-687d-4e4f-86c7-d8e3599cc0f6?locale=en Production - https://adl.b2.adventistdigitallibrary.org/admin/admin_sets/0e48eca3-e5cd-43a5-8a70-0e3f388591be?locale=en

Here's a staging user collection that I can't edit--I only get the error message: https://testing.s2.adventistdigitallibrary.org/dashboard/collections/dde6eae7-6778-4574-9473-fa3f72942d99?locale=en I can't edit existing collections on prod. Here's a screenshot of my latest attempt (2023-11-20):

Image

Acceptance Criteria

Investigation results

Ref:

The error is being thrown because the forms are trying to render a partial that's missing. Specifically, app/views/hyrax/dashboard/collections/_current_thumbnail.html.erb.

This file was deleted on Oct 16 in commit:

This file still exists in upstream Hyku.

The deletion seems unrelated to the other changes in the commit, so I'm guessing it was accidental? Restoring the file should prevent the error from happening.

Error trace ```bash I, [2023-12-04T19:23:44.918218 scientist-softserv/adventist-dl#1] INFO -- : [b7ce4b41a4af43bbf5f3f2c68680df59] Started GET "/dashboard/collections/4fc890b3-c81d-49c9-8c38-12ad2d30ac16/edit?locale=en" for 192.168.178.112 at 2023-12-04 19:23:44 +0000 I, [2023-12-04T19:23:45.106201 scientist-softserv/adventist-dl#1] INFO -- : [b7ce4b41a4af43bbf5f3f2c68680df59] Completed 500 Internal Server Error in 173ms (ActiveRecord: 33.9ms) D, [2023-12-04T19:23:45.110124 scientist-softserv/adventist-dl#1] DEBUG -- : [b7ce4b41a4af43bbf5f3f2c68680df59] Account Load (1.1ms) SELECT "public"."accounts".* FROM "public"."accounts" WHERE "public"."accounts"."tenant" = $1 LIMIT $2 [["tenant", "public"], ["LIMIT", 1]] I, [2023-12-04T19:23:45.221119 scientist-softserv/adventist-dl#1] INFO -- : [b7ce4b41a4af43bbf5f3f2c68680df59] Sending event 36f429bcd5c84be289a05649a6cba7f8 to Sentry D, [2023-12-04T19:23:45.239583 scientist-softserv/adventist-dl#1] DEBUG -- : [b7ce4b41a4af43bbf5f3f2c68680df59] Raven HTTP Transport connecting to https://o1008683.ingest.sentry.io F, [2023-12-04T19:23:45.316581 scientist-softserv/adventist-dl#1] FATAL -- : [b7ce4b41a4af43bbf5f3f2c68680df59] F, [2023-12-04T19:23:45.316647 scientist-softserv/adventist-dl#1] FATAL -- : [b7ce4b41a4af43bbf5f3f2c68680df59] ActionView::Template::Error (Missing partial hyrax/dashboard/collections/_current_thumbnail, hyrax/my/collections/_current_thumbnail, hyrax/my/_current_thumbnail, application/_current_thumbnail, catalog/_current_thumbnail, hyrax/base/_current_thumbnail with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :coffee, :jbuilder]}. Searched in: * "/app/samvera/hyrax-webapp/app/views" * "/usr/local/bundle/bundler/gems/iiif_print-5c5fa6880b3d/app/views" * "/usr/local/bundle/gems/blacklight_range_limit-6.5.0/app/views" * "/usr/local/bundle/gems/blacklight_advanced_search-6.4.1/app/views" * "/usr/local/bundle/gems/good_job-2.99.0/app/views" * "/usr/local/bundle/gems/devise_invitable-1.7.5/app/views" * "/usr/local/bundle/gems/devise-i18n-1.9.1/app/views" * "/usr/local/bundle/gems/devise-4.7.2/app/views" * "/usr/local/bundle/gems/qa-5.11.0/app/views" * "/usr/local/bundle/gems/flipflop-2.7.1/app/views" * "/usr/local/bundle/gems/bulkrax-5.3.0/app/views" * "/usr/local/bundle/gems/hyrax-2.9.6/app/views" * "/usr/local/bundle/gems/browse-everything-1.3.0/app/views" * "/usr/local/bundle/gems/hydra-editor-5.0.5/app/views" * "/usr/local/bundle/gems/blacklight-gallery-0.12.0/app/views" * "/usr/local/bundle/gems/mailboxer-0.15.1/app/views" * "/usr/local/bundle/gems/blacklight-6.25.0/app/views" * "/usr/local/bundle/gems/kaminari-core-1.2.2/app/views" * "/usr/local/bundle/gems/bulkrax-5.3.0/app/views" ): F, [2023-12-04T19:23:45.316821 scientist-softserv/adventist-dl#1] FATAL -- : [b7ce4b41a4af43bbf5f3f2c68680df59] 43: Uploading an image here will replace a thumbnail selected from the above dropdown. For best results, use an image at least 500(width) x 900(height) px. If you would like to use an image from the dropdown above, click the "Clear upload" button below. [b7ce4b41a4af43bbf5f3f2c68680df59] 44:

[b7ce4b41a4af43bbf5f3f2c68680df59] 45:
[b7ce4b41a4af43bbf5f3f2c68680df59] 46: <%= render "current_thumbnail" %> [b7ce4b41a4af43bbf5f3f2c68680df59] 47:
[b7ce4b41a4af43bbf5f3f2c68680df59] 48: <%= f.file_field :thumbnail_upload, class: "thumbnail-upload" %> [b7ce4b41a4af43bbf5f3f2c68680df59] 49: <%= link_to("Clear upload", main_app.delete_uploaded_thumbnail_path, method: :post, remote: :true, class: "btn btn-danger mb-4 mt-2", id: "clear-upload") %> F, [2023-12-04T19:23:45.316856 scientist-softserv/adventist-dl#1] FATAL -- : [b7ce4b41a4af43bbf5f3f2c68680df59] F, [2023-12-04T19:23:45.316879 scientist-softserv/adventist-dl#1] FATAL -- : [b7ce4b41a4af43bbf5f3f2c68680df59] app/views/hyrax/dashboard/collections/_form.html.erb:46:in `block in _app_views_hyrax_dashboard_collections__form_html_erb___1756626244783578818_559480' [b7ce4b41a4af43bbf5f3f2c68680df59] app/views/hyrax/dashboard/collections/_form.html.erb:26:in `_app_views_hyrax_dashboard_collections__form_html_erb___1756626244783578818_559480' [b7ce4b41a4af43bbf5f3f2c68680df59] app/middleware/no_cache_middleware.rb:13:in `call' 192.168.172.72, 192.168.88.250 - - [04/Dec/2023:19:23:45 +0000] "GET /500?locale=en HTTP/1.0" 500 1477 0.4008 ```
KatharineV commented 7 months ago

Team, I also can't edit existing collections. Are these bugs related? Here's the one I'm trying, and the edit button just leads to a dead-end error message. https://adl.b2.adventistdigitallibrary.org/dashboard/collections/7fc63bf7-71aa-4c3b-a448-8b56c7b5c891?locale=en

ShanaLMoore commented 4 months ago

Sentry error: image

Q: Will this get resolved by moving to adventist knapsack?

A: It's likely. Worth double checking/spike ticket

bkiahstroud commented 4 months ago

If the missing file (app/views/hyrax/dashboard/collections/_current_thumbnail.html.erb) hasn't been deleted in Adventist Knapsack, then yes that would likely resolve this issue. I think simply restoring the missing file should fix this issue in DL

aprilrieger commented 1 month ago

Testing this on staging I was able to create a collection, create a admin set and edit and save both without error. Testing this on production I was able to create a collection, create a admin set and edit and save both without error.

Video demo: https://share.zight.com/KoukdE4l

@KatharineV are you still seeing this issue on your end?

KatharineV commented 3 weeks ago

@aprilrieger sorry for the late reply on this. I was under a tight deadline that finally passed! I checked the collection functionality today and I am not seeing the issues we had before. It seems like restoring the missing file, referenced above, has restored functionality!