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

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

Closed
scherztc opened this issue Dec 13, 2023 · 3 comments · Fixed by #1148 · May be fixed by #1157
Closed

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

scherztc opened this issue Dec 13, 2023 · 3 comments · Fixed by #1148 · May be fixed by #1157
Assignees

Comments

@scherztc
Copy link
Contributor

scherztc commented Dec 13, 2023

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’
  1. 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'

  2. 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'

  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: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'

  4. 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'

  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: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'

  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: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
Copy link
Contributor Author

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

@Janell-Huyck
Copy link
Contributor

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 scherztc self-assigned this Apr 16, 2024
@scherztc
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants