uclibs / ucrate

Scholar@UC: University of Cincinnati's self-submission institutional repository
https://scholar.uc.edu
Other
5 stars 3 forks source link

HUT : <%= render_edit_field_partial(term, f: f) %> #1132

Closed scherztc closed 2 months ago

scherztc commented 9 months ago

Descriptive summary

This test broke when we updated hyrax from version 2.9.8 to 3.6.0

<%= render_edit_field_partial(term, f: f) %>

Expected behavior

I expect that it has something to do with DOI’s. So it might be as simple as fixing a test. It might be part of the DOI refactor. DOI’s are an overwrite area or could be missing metadata

Actual behavior

'' 3) DOIs behaves like doi request creating a work with private visibility mints a DOI for the work and the work can be edited

No reason given

 Failure/Error: <%= render_edit_field_partial(term, f: f) %>

 ActionView::Template::Error:
   No input found for multi_value
 Shared Example Group: "doi request" called from ./spec/features/doi_request_spec.rb:5
 # ./app/views/hyrax/base/_form_metadata.html.erb:9:in `block in _app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'
 # ./app/views/hyrax/base/_form_metadata.html.erb:8:in `each'
 # ./app/views/hyrax/base/_form_metadata.html.erb:8:in `_app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'
 # ./app/views/hyrax/base/_guts4form.html.erb:53:in `block in _app_views_hyrax_base__guts_form_html_erb___1467895677427454547_833740'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `each'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `each_with_index'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `_app_views_hyrax_base__guts_form_html_erb___1467895677427454547_833740'
 # ------------------
 # --- Caused by: ---
 # RuntimeError:
 #   No input found for multi_value
 #   ./app/views/hyrax/base/_form_metadata.html.erb:9:in `block in _app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800’

5) DOIs behaves like doi request creating a work with private visibility mints a DOI for the work and the work can be edited

No reason given

 Failure/Error: <%= render_edit_field_partial(term, f: f) %>

 ActionView::Template::Error:
   No input found for multi_value
 Shared Example Group: "doi request" called from ./spec/features/doi_request_spec.rb:12
 # ./app/views/hyrax/base/_form_metadata.html.erb:9:in `block in _app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'
 # ./app/views/hyrax/base/_form_metadata.html.erb:8:in `each'
 # ./app/views/hyrax/base/_form_metadata.html.erb:8:in `_app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'
 # ./app/views/hyrax/base/_guts4form.html.erb:53:in `block in _app_views_hyrax_base__guts_form_html_erb___1467895677427454547_833740'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `each'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `each_with_index'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `_app_views_hyrax_base__guts_form_html_erb___1467895677427454547_833740'
 # ------------------
 # --- Caused by: ---
 # RuntimeError:
 #   No input found for multi_value
 #   ./app/views/hyrax/base/_form_metadata.html.erb:9:in `block in _app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'

6) DOIs behaves like doi request creating a work with private visibility mints a DOI for the work and the work can be edited

No reason given

 Failure/Error: <%= render_edit_field_partial(term, f: f) %>

 ActionView::Template::Error:
   No input found for multi_value
 Shared Example Group: "doi request" called from ./spec/features/doi_request_spec.rb:10
 # ./app/views/hyrax/base/_form_metadata.html.erb:9:in `block in _app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'
 # ./app/views/hyrax/base/_form_metadata.html.erb:8:in `each'
 # ./app/views/hyrax/base/_form_metadata.html.erb:8:in `_app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'
 # ./app/views/hyrax/base/_guts4form.html.erb:53:in `block in _app_views_hyrax_base__guts_form_html_erb___1467895677427454547_833740'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `each'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `each_with_index'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `_app_views_hyrax_base__guts_form_html_erb___1467895677427454547_833740'
 # ------------------
 # --- Caused by: ---
 # RuntimeError:
 #   No input found for multi_value
 #   ./app/views/hyrax/base/_form_metadata.html.erb:9:in `block in _app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'

7) DOIs behaves like doi request creating a work with private visibility mints a DOI for the work and the work can be edited

No reason given

 Failure/Error: <%= render_edit_field_partial(term, f: f) %>

 ActionView::Template::Error:
   No input found for multi_value
 Shared Example Group: "doi request" called from ./spec/features/doi_request_spec.rb:6
 # ./app/views/hyrax/base/_form_metadata.html.erb:9:in `block in _app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'
 # ./app/views/hyrax/base/_form_metadata.html.erb:8:in `each'
 # ./app/views/hyrax/base/_form_metadata.html.erb:8:in `_app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'
 # ./app/views/hyrax/base/_guts4form.html.erb:53:in `block in _app_views_hyrax_base__guts_form_html_erb___1467895677427454547_833740'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `each'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `each_with_index'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `_app_views_hyrax_base__guts_form_html_erb___1467895677427454547_833740'
 # ------------------
 # --- Caused by: ---
 # RuntimeError:
 #   No input found for multi_value
 #   ./app/views/hyrax/base/_form_metadata.html.erb:9:in `block in _app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'

8) DOIs behaves like doi request creating a work with private visibility mints a DOI for the work and the work can be edited

No reason given

 Failure/Error: <%= render_edit_field_partial(term, f: f) %>

 ActionView::Template::Error:
   No input found for multi_value
 Shared Example Group: "doi request" called from ./spec/features/doi_request_spec.rb:9
 # ./app/views/hyrax/base/_form_metadata.html.erb:9:in `block in _app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'
 # ./app/views/hyrax/base/_form_metadata.html.erb:8:in `each'
 # ./app/views/hyrax/base/_form_metadata.html.erb:8:in `_app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'
 # ./app/views/hyrax/base/_guts4form.html.erb:53:in `block in _app_views_hyrax_base__guts_form_html_erb___1467895677427454547_833740'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `each'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `each_with_index'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `_app_views_hyrax_base__guts_form_html_erb___1467895677427454547_833740'
 # ------------------
 # --- Caused by: ---
 # RuntimeError:
 #   No input found for multi_value
 #   ./app/views/hyrax/base/_form_metadata.html.erb:9:in `block in _app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'

9) DOIs behaves like doi request creating a work with private visibility mints a DOI for the work and the work can be edited

No reason given

 Failure/Error: <%= render_edit_field_partial(term, f: f) %>

 ActionView::Template::Error:
   No input found for multi_value
 Shared Example Group: "doi request" called from ./spec/features/doi_request_spec.rb:7
 # ./app/views/hyrax/base/_form_metadata.html.erb:9:in `block in _app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'
 # ./app/views/hyrax/base/_form_metadata.html.erb:8:in `each'
 # ./app/views/hyrax/base/_form_metadata.html.erb:8:in `_app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'
 # ./app/views/hyrax/base/_guts4form.html.erb:53:in `block in _app_views_hyrax_base__guts_form_html_erb___1467895677427454547_833740'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `each'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `each_with_index'
 # ./app/views/hyrax/base/_guts4form.html.erb:44:in `_app_views_hyrax_base__guts_form_html_erb___1467895677427454547_833740'
 # ------------------
 # --- Caused by: ---
 # RuntimeError:
 #   No input found for multi_value
 #   ./app/views/hyrax/base/_form_metadata.html.erb:9:in `block in _app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'

10) DOIs behaves like doi request creating a work with private visibility mints a DOI for the work and the work can be edited

No reason given

  Failure/Error: <%= render_edit_field_partial(term, f: f) %>

  ActionView::Template::Error:
    No input found for multi_value
  Shared Example Group: "doi request" called from ./spec/features/doi_request_spec.rb:11
  # ./app/views/hyrax/base/_form_metadata.html.erb:9:in `block in _app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'
  # ./app/views/hyrax/base/_form_metadata.html.erb:8:in `each'
  # ./app/views/hyrax/base/_form_metadata.html.erb:8:in `_app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800'
  # ./app/views/hyrax/base/_guts4form.html.erb:53:in `block in _app_views_hyrax_base__guts_form_html_erb___1467895677427454547_833740'
  # ./app/views/hyrax/base/_guts4form.html.erb:44:in `each'
  # ./app/views/hyrax/base/_guts4form.html.erb:44:in `each_with_index'
  # ./app/views/hyrax/base/_guts4form.html.erb:44:in `_app_views_hyrax_base__guts_form_html_erb___1467895677427454547_833740'
  # ------------------
  # --- Caused by: ---
  # RuntimeError:
  #   No input found for multi_value
  #   ./app/views/hyrax/base/_form_metadata.html.erb:9:in `block in _app_views_hyrax_base__form_metadata_html_erb___1097713587934450540_833800’ ''

Steps to reproduce the behavior

  1. coveralls report
  2. Then do this...

Related work

Link to related issues or prior related work here.

scherztc commented 9 months ago

Here is where we first experience this render partial error on ingest : http://localhost:3000/concern/images/new?locale=en

Janell-Huyck commented 9 months ago

The <%= render_edit_field_partial(term, f: f) %> error is from an input type being called by render_edit_field_partial, as: :multi_value.

From PR#1148: We were having problems with Scholar not recognizing the input type "as: :multi_value". Any time we were attempting to take an input with the "multi_value" format, the app would crash.

"MultiValueInput" is a custom input class created by hydra-editor and present in the version of hydra-editor we are using, 5.0.5. SimpleForm should have been using that class to handle anything with the "as: :multi_value" tags, but it wasn't.

It turns out that Scholar was not loading the input classes from hydra-editor. This PR adds the input classes of hydra-editor to the load path for Scholar, and then specifically requires the "multi_value_input" file. With this addition to the initializers, all of our work types can now successfully use the multi_value format.

scherztc commented 2 months ago

Closed by JIRA : https://ucdts.atlassian.net/browse/LIBSCHOLAR-14?atlOrigin=eyJpIjoiYTA0MmM2NGVlOTVmNDA5OGJkNjAwOTBhZDY0ZTI1MzUiLCJwIjoiaiJ9