samvera / hyrax

Hyrax is a Ruby on Rails Engine built by the Samvera community. Hyrax provides a foundation for creating many different digital repository applications.
http://hyrax.samvera.org/
Apache License 2.0
185 stars 124 forks source link

Edit form with Monograph (Valkyrie resource) fails to display all fields in the Descriptions tab #4899

Closed elrayle closed 2 years ago

elrayle commented 3 years ago

Descriptive summary

The Monograph is a Valkyrie resource. When editing an existing Monograph work, all the fields shown in the new work form should also be shown in the edit work form. But the edit work form only shows the Title field.

Rationale

The edit form should behave the same for AF objects and Valkyrie resources.

Expected behavior

The edit form should have the same fields as the new form on the Description tab. The image below is the new form.

image

Actual behavior

Only the Title field is displayed on the Descriptions tab. The image is the actual edit form.

image

Steps to reproduce the behavior

Prerequisite

  1. Login
  2. Click Share Work on Home page
  3. Select Monograph as type of work
  4. Fill in required fields and add file.
  5. Save

Reproduce behavior

  1. Navigate to Dashboard -> Works
  2. Edit the work created in the prerequisites

Fails to display all fields.

Related Work

Issue #4900 - Edit form error when setting Sharing permissions

no-reply commented 3 years ago

this might be fixed by #4947

rjkati commented 2 years ago

@elrayle this works as expected on nurax-pg. On nurax-dev, I get a NoMethodError in Hyrax::Monographs#new error message when I try to create a monograph work which blocks further testing. nomethoderror-monograph

elrayle commented 2 years ago

There have been changes to generators and it is possible that the Monograph on nurax-pg is slightly different than the Monograph on nurax-dev. This will require more exploration, but I would start with a comparison of the two Monograph classes (and other generated components of the Monographs) before jumping deep into Hyrax code.

elrayle commented 2 years ago

Issue #5447 describes the problem when trying to edit a Monograph that causes the exception. The exception only happens when Settings -> Features -> Batch Upload is ON. When that is turned off, I can confirm that this issue is fixed.