hyrax icon indicating copy to clipboard operation
hyrax copied to clipboard

Create new sub-collection leads to NoMethodError in Hyrax::Dashboard::NestCollectionsController#create_collection_under

Open MPLSFedResearchTZ opened this issue 2 years ago • 7 comments

Descriptive summary

Clicking "Create new collection as subcollection" gives rise to error page of "NoMethodError in Hyrax::Dashboard::NestCollectionsController#create_collection_under".

Steps to reproduce the behavior

  1. Go to collection editing page.
  2. Clicking "Create new collection as subcollection"
  3. Error page appears

MPLSFedResearchTZ avatar Mar 03 '22 22:03 MPLSFedResearchTZ

Related issue #5449. Perhaps duplicate but appears to be getting NoMethodError for #create_collection_under instead of #find.

elrayle avatar Mar 07 '22 16:03 elrayle

This error is still occurring on nurax-pg:

Screen Shot 2022-04-06 at 5 11 07 PM

Steps to reproduce the behavior

  • From Dashboard -> Collections create a collection of type "nesting only"
  • From Dashboard -> Collections, click the title of the collection
  • Click Create new collection as subcollection (this is where the error occurs that is in the screenshot)

jlhardes avatar Apr 06 '22 21:04 jlhardes

@jlhardes i'm confused if this is an issue with nurax-pg / valkyrie support, or if it's a base hyrax issue.

i don't think any of the NestCollectionsController supports valkyrie. AFAIK, this is the only thing not passing the full test suite when using a valkyrie collection model.

this was coming up to the top of my ToDo list, but i'm concerned about taking that work on if the controller is broken against the ActiveFedora branch.

no-reply avatar May 11 '22 20:05 no-reply

This was from testing nurax-pg so it is valkyrie-specific. I just tested again and the error is still occurring on nurax-pg. Does that help?

jlhardes avatar May 11 '22 21:05 jlhardes

@jlhardes and @no-reply I'm taking a look at it again.

blancoj avatar Jun 29 '22 19:06 blancoj

@cjcolvar @blancoj I'm still seeing the error (testing on nurax-pg)

5492

gamontoya avatar Sep 13 '22 19:09 gamontoya

The fix hasn't been merged and deployed to nurax-pg yet. I can tag you for retesting once it is deployed.

cjcolvar avatar Sep 13 '22 19:09 cjcolvar

I was able to successfully create a sub collection within a User Collection type that I had previously created, using the original steps in the ticket description. I am seeing another error when trying to open the All Collections tab within the Dashboard however.
Screen Shot 2023-01-23 at 1 29 03 PM

Screen Shot 2023-01-23 at 1 29 18 PM

eporter23 avatar Jan 23 '23 18:01 eporter23

I think this sub-collection issue is fixed. It works for me testing locally on koppie the same as you reported. The All Collections tab on nurax-pg is not working when logged in as an admin user. Testing locally on koppie as an admin user, the All Collections tab is working so it might be something specific to indexing on nurax-pg?

jlhardes avatar Jan 23 '23 18:01 jlhardes

Thanks @jlhardes I was wondering if it was a nurax-pg specific error since it seemed to reference a specific Collection Type id being missing. I'll go ahead and close this one.

eporter23 avatar Jan 23 '23 19:01 eporter23