hyrax
hyrax copied to clipboard
Editing batch of works generates "NoMethodError in Hyrax::BatchEditsController#edit" error
Descriptive summary
On nurax-pg, editing a batch of works displays a "NoMethodError in Hyrax::BatchEditsController#edit" error
Expected behavior
Selecting multiple works on the Works page and clicking "Edit Selected" should bring me to an edit page
Actual behavior
Selecting multiple works on the Works page and clicking "Edit Selected" generates an error message:
Steps to reproduce the behavior
- On nurax-pg, navigate to Dashboard -> Works
- Select one or more works on the Works page
- Click the "Edit Selected" button
- Observe error message
Related work
#5461 Issue with initial report of batch work edit problem but error message was different
#4913 BatchEditsController needs to support valkyrie objects - code changes identified here might be part of the work that needs to happen to address this issue
Still seeing error message when selecting multiple works and trying to "Edit Selected" when testing locally on koppie.
@rjkati This now works on Hyrax Version: 4.0.0.rc3
, but it fails with Koppie v4.0.0.rc3
Hyrax:
Koppie:
I've created 2 GenericWork's on the koppie app and in the Hyrax app. trying to batch edit on Koppie showed me that the form thought it was editing at least one Monograph work. I don't have any Monograph works in my local apps. I also noticed that when I accessed the rails console for koppie, it couldn't return a count for GenericWorks, but it could for Hyrax.
# KOPPIE
[3] pry(main)> GenericWork.all.count
NoMethodError: undefined method `all' for GenericWork:Class
from (pry):3:in `__pry__'
# HYRAX
[2] pry(main)> GenericWork.all.count
=> 2
the dassie GenericWork and koppie GenericWork models are defined differently. The dassie Monograph and koppie Monograph models are defined the same however. to try and make sure things were as similar as possible between the two, I tried to make a monograph work in both apps, but the form for both failed with the error below.
I merged main
into the valykyrie_batch_edit
branch and the batch edit works in koppie. (the branch with the combined code is valykyrie_batch_edit_update
)
@dlpierce please refer to the comment above. the koppie app is working, but the hyrax app is not. is that your expectation? or do you have other work from this branch that hasn't been pushed?
tried this again today and the batch edit is working in hyrax and koppie. 🤷🏾♀️ 🎉 I left screen recordings on #5864.
the spec pipelines, like several of the others, are still failing though. 😞
the spec pipelines are still failing and I believe they're legitimate. I time boxed trying to solve this and I'm putting this down.