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

Empty flash messages appear on work or collection forms #1848

Open
laritakr opened this issue Oct 11, 2022 · 0 comments
Open

Empty flash messages appear on work or collection forms #1848

laritakr opened this issue Oct 11, 2022 · 0 comments

Comments

@laritakr
Copy link
Collaborator

Descriptive summary

This error was encountered in both Louisville (Hyrax v2.9.6) and UTK (Hyrax v 3.4.1). This ticket replaces a similar UTK-specific ticket.

When trying to save a work or collection with metadata which does not pass rails server-side validations, we see an empty flash message on the screen. This may be a Hyrax bug or may be Hyku-specific. See screenshots below.

If the submission error is fixed and resubmitted, there may also be another error situation with permission templates which was overridden in Louisville and reported as a bug on Hyrax.

Rationale

Even though Hyku does not have built-in server-side metadata validations, if repositories built over Hyku add validations, these validations should be handled correctly. It should not be handled in each individual repository. UTK validates that there is only one title, and Louisville validates that slugs are unique. Both repositories have encountered this error.

Expected behavior

A metadata error in a work or collection should show an error telling what is incorrect, and allow correction of the error and resubmission of the form. There should be no empty flash error boxes on the screen.

Actual behavior

  • blank error messages may appear because the Hyrax partial _flash_msg.html.erb is not receiving the appropriate information to display the messages.
  • Redisplaying the form, correcting the error, and resubmitting resulted in a permission template error.

Steps to reproduce the behavior

  1. Create a work with metadata that fails rails validations (i.e. a second title for UTK or a duplicate slug in Louisville). Note that Hyku itself does not use rails validations on the objects, so a valid may need to be added to be able to duplicate the issue here.
  2. Fix the error and resubmit the form without a full form refresh.

Related work

Hyrax ticket regarding permission template error

Screenshots

Screen Shot 2022-10-11 at 3 12 29 PM

Screen Shot 2022-10-11 at 3 12 50 PM

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

No branches or pull requests

1 participant