Update 'Customizing Metadata' page.
Descriptive summary
All custom metadata properties must be defined before the inclusion of ::Hyrax::BasicMetadata in the model. This is due to changes in commit 89ffdb757a7ae545e303919d2277901237a5fd30 which finalize the model within ::Hyrax::BasicMetadata.
Defining properties after include ::Hyrax::BasicMetadata results in an ActiveTriples::UndefinedPropertyError
Does the Customizing Metadata wiki page require any updates for Hyrax 2.x? I'm working through updating from 1.0.5, and I've got some custom metadata that hopefully should carry forward correctly, but not sure to what degree this documentation reflects anything new/different in Hyrax 2.
Hi I get the same error for FileSet while extending the FileMetadata properties . My Works save without any error. But I get ActiveTriples::UndefinedPropertyError (ActiveTriples::UndefinedPropertyError)
for saving the FileSet although I have
include ::Hyrax::BasicMetadata in the end of the FileSet class after defining my extended properties. Any pointers please?
Solution: This is the same error that the model was being finalised within ::Hyrax::FileSetBehavior. So In the FIleSets " include ::Hyrax::FileSetBehavior" had to be placed at the end of the class after defining all the extra properties.
Note that the deprecation of Solrizer in 3.x (refs: #3399 #3831 #3794 ) necessitates a change in these instructions. Adding methods to app/models/solr_document.rb (see https://samvera.github.io/customize-metadata-show-page.html ) can no longer use Solrizer; a temporary workaround at the moment requires something like this instead:
def contact_email
self['contact_email_tesim']
end
thanks @kerchner.
i don't think this is a temporary work-around. it's the new way of setting index keys from ActiveFedora 13.0.0 onward
I think we should prioritize updating this documentation with the release of Hyrax 3.0.
cc: @afred is there a contributor group for the documentation WG?
Hello!
We ran into this one a little bit while using 3.0.0.pre.rc1 (I get that pre and rc1 mean that this is a little more of a "use at your own risk :P)
Can someone point me to where this documentation lives or should live and we can take this work up as part of a project we are working on.
@heathergreerklein Is this out-of-date? Looked at in SMIG.