-
Notifications
You must be signed in to change notification settings - Fork 120
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
cannot display Valkyrie Resource saved through new form - raises undefined method `model_name' for nil:NilClass #4559
Comments
I can read and write with pure valkyrie calls. This works to save the resource...
But if I try to display the saved resource in Hyrax internal app, I get the same error as described in the issue above. http://localhost:3000/concern/monographs/2227mp645?locale=en Raises Hyrax uses the
Raises |
If I add a method to the change set that returns the admin set, I get past the error thrown by running the transaction. But this only leads me to another error...
|
@elrayle the issue with the easiest way to avoid this pitfall is to always use the Container interface for resolving transaction names consistently using this interface will also help ensure that intended customizations are applied uniformly. |
i get a different error entirely when i try to create the work via the form:
called from
|
Retrying with the suggested change to transaction does save the work...
|
Also… * makes sure all tests are using Monograph which is a Valkyrie resource work * comments out places that are subject to error described in Issue #4559
Also… * makes sure all tests are using Monograph which is a Valkyrie resource work * comments out places that are subject to error described in Issue #4559
Also… * makes sure all tests are using Monograph which is a Valkyrie resource work * comments out places that are subject to error described in Issue #4559
Also… * makes sure all tests are using Monograph which is a Valkyrie resource work * comments out places that are subject to error described in Issue #4559
This is to make rubocop happy with a kludge for issue #4559
This is to make rubocop happy with a kludge for issue #4559 rc rc
Also… * makes sure all tests are using Monograph which is a Valkyrie resource work * comments out places that are subject to error described in Issue #4559
This is to make rubocop happy with a kludge for issue #4559 rc rc
In debugging, we can see...
Looking at the form, the permissions are stored in field We tried reworking the We weren't able to locate exactly where the code that sets permissions in the form for AF objects was located to see if we could connect the AF process to the Resource process. |
is this one cleared? on my local ( |
Tested with latest master and the forward happens without error. Closing. |
Descriptive summary
Cannot display a valkyrie resource work that was created with the valkyrie based form. Note that the form may be working fine. I suspect it is something to do with the structure of the resource or the change set that is generated for the resource.
Rationale
Valkyrie Resources should work with save and display.
Expected behavior
Attempting to display a valkyrie resource on the show view after it is created through the valkyrie based form should show the valkyrie resource work with the values set and saved in the new form.
Actual behavior
Attempting to display a valkyrie resource on the show view after it is created through the valkyrie based form raises an exception.
Steps to reproduce the behavior
When it forwards to the display page after saving, it raises
undefined method 'model_name' for nil:NilClass
inapp/models/concerns/hyrax/solr_document_behavior.rb
.I haven't completely traced this, but it appears to have something to do with permissions and missing attribute admin_set.
The text was updated successfully, but these errors were encountered: