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

BUGS: Odd Behaviors After Creating Objects Using Pair-Tree'd Storage #408

Open
2 tasks done
bwatson78 opened this issue Jul 15, 2024 · 5 comments
Open
2 tasks done
Labels
Backend bug Something isn't working Samvera Issues related to Samvera stack

Comments

@bwatson78
Copy link
Contributor

bwatson78 commented Jul 15, 2024

  • Collection edit form doesn't reflect correct Discovery visibility.
    Attempting to edit and save a work results in this error
app-1         | Processing by Hyrax::PublicationsController#update as HTML
app-1         |   Parameters: {"authenticity_token"=>"B/bDk+T4Zng1l8UStzngTCObmpwKQ6gG6DLcratLy+gnjXs/28xXjXT6bA2H4Ryo0/4V1EOsFaGknMzzcfJBfA==", "publication"=>{"content_genre"=>"Article", "title"=>["Test Pres Events", ""], "creators"=>{"first_name"=>"Brad", "last_name"=>"Watson", "institution"=>"Emory", "orcid_id"=>""}, "language"=>"English", "date_issued"=>"2024", "publisher"=>["Schuster", "Simon"], "publisher_version"=>"Author Accepted Manuscript (After Peer Review)", "rights_notes"=>["sdvdfbeh", ""], "license"=>"", "final_published_versions"=>[""], "parent_title"=>"Parent title", "conference_name"=>"", "issn"=>"", "isbn"=>"", "series_title"=>"", "edition"=>"", "volume"=>"", "issue"=>"", "page_range_start"=>"", "page_range_end"=>"", "place_of_production"=>"", "sponsor"=>"", "grant_agencies"=>[""], "grant_information"=>[""], "related_datasets"=>[""], "abstract"=>[""], "author_notes"=>"", "keyword"=>[""], "subject"=>[""], "research_categories"=>[""], "rights_statement"=>"http://rightsstatements.org/vocab/InC/1.0/", "emory_ark"=>[""], "internal_rights_note"=>"", "staff_notes"=>[""], "system_of_record_ID"=>"", "emory_content_type"=>"http://id.loc.gov/vocabulary/resourceTypes/txt", "holding_repository"=>"Emory University. Library", "institution"=>"Emory University", "data_classification"=>"Public", "deduplication_key"=>"", "representative_id"=>"634dc8db-1ff0-4730-86bd-b110cab321fd", "thumbnail_id"=>"634dc8db-1ff0-4730-86bd-b110cab321fd", "rendering_ids"=>[""], "admin_set_id"=>"3e8f1dd6-ed06-4ddc-acff-dc389b3c19ed", "member_of_collection_ids"=>"", "find_child_work"=>"", "visibility_during_embargo"=>"restricted", "embargo_release_date"=>"2024-07-16", "visibility_after_embargo"=>"open", "visibility_during_lease"=>"open", "lease_expiration_date"=>"2024-07-16", "visibility_after_lease"=>"restricted", "visibility"=>"restricted", "version"=>"", "creator"=>["Brad, Watson, Emory"]}, "new_group_name_skel"=>"Select a group", "new_group_permission_skel"=>"none", "new_user_name_skel"=>"", "new_user_permission_skel"=>"none", "agreement"=>"1", "locale"=>"en", "id"=>"a4e7d8ae-cba3-4a5b-8bfe-b673d0bfb1d4"}
app-1         |   Hyrax::Feature Load (0.8ms)  SELECT "hyrax_features".* FROM "hyrax_features" WHERE "hyrax_features"."key" = $1 ORDER BY "hyrax_features"."id" ASC LIMIT $2  [["key", "read_only"], ["LIMIT", 1]]
fcrepo-1      | INFO 12:35:26.394 [http-nio-8080-exec-7] (FedoraLdp) GET resource 'development/a4/e7/d8/ae/a4e7d8ae-cba3-4a5b-8bfe-b673d0bfb1d4'
fcrepo-1      | INFO 12:35:26.404 [http-nio-8080-exec-5] (FedoraLdp) GET resource 'development/a4/e7/d8/ae/a4e7d8ae-cba3-4a5b-8bfe-b673d0bfb1d4'
app-1         |   User Load (0.8ms)  SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2  [["id", 1], ["LIMIT", 1]]
app-1         |   Role Load (0.7ms)  SELECT "roles".* FROM "roles" INNER JOIN "roles_users" ON "roles"."id" = "roles_users"."role_id" WHERE "roles_users"."user_id" = $1  [["user_id", 1]]
app-1         | Usergroups are ["public", "admin", "registered"]
app-1         |   Role Exists? (2.1ms)  SELECT 1 AS one FROM "roles" INNER JOIN "roles_users" ON "roles"."id" = "roles_users"."role_id" WHERE "roles_users"."user_id" = $1 AND "roles"."name" = $2 LIMIT $3  [["user_id", 1], ["name", "admin"], ["LIMIT", 1]]
app-1         |   ↳ app/models/ability.rb:10:in `custom_permissions'
app-1         |   Hyrax::Feature Load (0.7ms)  SELECT "hyrax_features".* FROM "hyrax_features" WHERE "hyrax_features"."key" = $1 ORDER BY "hyrax_features"."id" ASC LIMIT $2  [["key", "transfer_works"], ["LIMIT", 1]]
app-1         |   Hyrax::Feature Load (0.9ms)  SELECT "hyrax_features".* FROM "hyrax_features" WHERE "hyrax_features"."key" = $1 ORDER BY "hyrax_features"."id" ASC LIMIT $2  [["key", "proxy_deposit"], ["LIMIT", 1]]
fcrepo-1      | INFO 12:35:26.593 [http-nio-8080-exec-6] (FedoraLdp) GET resource 'development/a4/e7/d8/ae/a4e7d8ae-cba3-4a5b-8bfe-b673d0bfb1d4'
fcrepo-1      | INFO 12:35:26.647 [http-nio-8080-exec-1] (FedoraLdp) GET resource 'development/a4/e7/d8/ae/a4e7d8ae-cba3-4a5b-8bfe-b673d0bfb1d4'
fcrepo-1      | INFO 12:35:26.706 [http-nio-8080-exec-8] (FedoraLdp) GET resource 'development/a4/e7/d8/ae/a4e7d8ae-cba3-4a5b-8bfe-b673d0bfb1d4'
fcrepo-1      | INFO 12:35:26.757 [http-nio-8080-exec-7] (FedoraLdp) GET resource 'development/a4/e7/d8/ae/a4e7d8ae-cba3-4a5b-8bfe-b673d0bfb1d4'
app-1         | trying to prepopulate a lock token for PublicationForm, but optimistic locking isn't supported for the configured adapter: Valkyrie::Persistence::Fedora::MetadataAdapter
fcrepo-1      | INFO 12:35:26.812 [http-nio-8080-exec-5] (FedoraLdp) GET resource 'development/a4/e7/d8/ae/a4e7d8ae-cba3-4a5b-8bfe-b673d0bfb1d4'
fcrepo-1      | INFO 12:35:26.860 [http-nio-8080-exec-6] (FedoraLdp) GET resource 'development/a4/e7/d8/ae/a4e7d8ae-cba3-4a5b-8bfe-b673d0bfb1d4'
fcrepo-1      | INFO 12:35:26.909 [http-nio-8080-exec-1] (FedoraLdp) GET resource 'development/a4/e7/d8/ae/a4e7d8ae-cba3-4a5b-8bfe-b673d0bfb1d4'
fcrepo-1      | INFO 12:35:26.956 [http-nio-8080-exec-8] (FedoraLdp) GET resource 'development/a4/e7/d8/ae/a4e7d8ae-cba3-4a5b-8bfe-b673d0bfb1d4'
app-1         |   Hyrax::CollectionType Load (0.6ms)  SELECT "hyrax_collection_types".* FROM "hyrax_collection_types" WHERE "hyrax_collection_types"."allow_multiple_membership" = $1  [["allow_multiple_membership", false]]
app-1         |   ↳ app/controllers/hyrax/publications_controller.rb:80:in `update_valkyrie_work'
app-1         |   CACHE Hyrax::CollectionType Load (0.0ms)  SELECT "hyrax_collection_types".* FROM "hyrax_collection_types" WHERE "hyrax_collection_types"."allow_multiple_membership" = $1  [["allow_multiple_membership", false]]
app-1         |   ↳ app/controllers/hyrax/publications_controller.rb:86:in `update_valkyrie_work'
fcrepo-1      | INFO 12:35:27.006 [http-nio-8080-exec-7] (FedoraLdp) HEAD for: development
fcrepo-1      | INFO 12:35:27.012 [http-nio-8080-exec-5] (FedoraLdp) GET resource 'development/a4/e7/d8/ae/a4e7d8ae-cba3-4a5b-8bfe-b673d0bfb1d4'
app-1         | Transaction failed: Failed save on #<PublicationForm:0x00007fcfa5321640>
app-1         |         undefined method `split' for nil:NilClass
app-1         |   /app/bundle/ruby/3.2.0/gems/valkyrie-3.3.0/lib/valkyrie/persistence/fedora/metadata_adapter.rb:87:in `pair_path'
  • Attempting to edit a FileSet produces this error:
 Showing /app/app/views/hyrax/file_sets/_form.html.erb where line #23 raised:

undefined method `to_model' for nil:NilClass

Extracted source (around line #23):

21
22
23
24
25
26
              

	

        class: 'btn btn-primary'
      ) %>
      <%= link_to t('.cancel'), parent_path(@parent), class: 'btn btn-link' %>
    </div>
  </div>
<% end %>

Trace of template inclusion: #<ActionView::Template bundle/ruby/3.2.0/bundler/gems/hyrax-59a42adfd57e/app/views/hyrax/file_sets/edit.html.erb locals=[]>

Rails.root: /app
Application Trace | Framework Trace | Full Trace
actionpack (6.1.7.8) lib/action_dispatch/routing/polymorphic_routes.rb:314:in `handle_list'
actionpack (6.1.7.8) lib/action_dispatch/routing/polymorphic_routes.rb:218:in `polymorphic_method'
actionpack (6.1.7.8) lib/action_dispatch/routing/polymorphic_routes.rb:139:in `polymorphic_path'
hyrax (59a42adfd57e) app/helpers/hyrax/file_set_helper.rb:20:in `parent_path'
app/views/hyrax/file_sets/_form.html.erb:23
actionview (6.1.7.8) lib/action_view/helpers/capture_helper.rb:45:in `block in capture'
actionview (6.1.7.8) lib/action_view/helpers/capture_helper.rb:209:in `with_output_buffer'
actionview (6.1.7.8) lib/action_view/helpers/capture_helper.rb:45:in `capture'
actionview (6.1.7.8) lib/action_view/helpers/form_helper.rb:450:in `form_for'
simple_form (5.1.0) lib/simple_form/action_view_extensions/form_helper.rb:27:in `block in simple_form_for'
simple_form (5.1.0) lib/simple_form/action_view_extensions/form_helper.rb:46:in `with_simple_form_field_error_proc'
simple_form (5.1.0) lib/simple_form/action_view_extensions/form_helper.rb:26:in `simple_form_for'
app/views/hyrax/file_sets/_form.html.erb:1
actionview (6.1.7.8) lib/action_view/base.rb:247:in `public_send'
actionview (6.1.7.8) lib/action_view/base.rb:247:in `_run'
actionview (6.1.7.8) lib/action_view/template.rb:154:in `block in render'
activesupport (6.1.7.8) lib/active_support/notifications.rb:205:in `instrument'
actionview (6.1.7.8) lib/action_view/template.rb:345:in `instrument_render_template'
actionview (6.1.7.8) lib/action_view/template.rb:152:in `render'
xray-rails (f121814718c9) lib/xray/engine.rb:27:in `render_with_xray'
actionview (6.1.7.8) lib/action_view/renderer/partial_renderer.rb:285:in `block in render_partial_template'
activesupport (6.1.7.8) lib/active_support/notifications.rb:203:in `block in instrument'
activesupport (6.1.7.8) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.1.7.8) lib/active_support/notifications.rb:203:in `instrument'
actionview (6.1.7.8) lib/action_view/renderer/partial_renderer.rb:280:in `render_partial_template'
actionview (6.1.7.8) lib/action_view/renderer/partial_renderer.rb:271:in `render'
actionview (6.1.7.8) lib/action_view/renderer/renderer.rb:81:in `render_partial_to_object'
actionview (6.1.7.8) lib/action_view/renderer/renderer.rb:53:in `render_partial'
actionview (6.1.7.8) lib/action_view/helpers/rendering_helper.rb:45:in `render'
hyrax (59a42adfd57e) app/views/hyrax/file_sets/edit.html.erb:34 
@bwatson78 bwatson78 added bug Something isn't working Backend labels Jul 15, 2024
@bwatson78 bwatson78 self-assigned this Jul 15, 2024
@bwatson78
Copy link
Contributor Author

The Attempting to edit a FileSet produces this error has been sent to Samvera as a bug: samvera/hyrax#6863

@bwatson78
Copy link
Contributor Author

Just confirmed that the Attempting to save banner image produces the following error: behavior is appearing in OE24. Extracting this out to separate bug ticket.

@bwatson78
Copy link
Contributor Author

Going through the collection objects after each visibility change, I see that the SolrDocument associated to the Fedora object takes in the correct visibility, but the new desired visibility never persists to the ACL associated to the Publication. Since this behavior isn't present in our non-pair-tree'd setup, I'm reporting this as a bug to Hyrax.

@bwatson78
Copy link
Contributor Author

The bug associated to Attempting to edit and save a work results in this error: is the only issue I could easily fix. that bug fix is included in the adds_pair_tree_to_storage branch.

@bwatson78
Copy link
Contributor Author

The Collection edit form doesn't reflect correct Discovery visibility. issue has been reported to Hyrax via samvera/hyrax#6864

@bwatson78 bwatson78 removed their assignment Jul 18, 2024
@eporter23 eporter23 added the Samvera Issues related to Samvera stack label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend bug Something isn't working Samvera Issues related to Samvera stack
Projects
None yet
Development

No branches or pull requests

2 participants