hyrax icon indicating copy to clipboard operation
hyrax copied to clipboard

Update 'Customizing Metadata' page.

Open jonathandixon opened this issue 8 years ago • 9 comments

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

jonathandixon avatar May 18 '17 20:05 jonathandixon

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.

kerchner avatar Jun 06 '18 21:06 kerchner

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?

bhavanaananda avatar Nov 29 '18 16:11 bhavanaananda

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.

bhavanaananda avatar Nov 30 '18 10:11 bhavanaananda

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

kerchner avatar Nov 05 '19 20:11 kerchner

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

no-reply avatar Nov 05 '19 20:11 no-reply

I think we should prioritize updating this documentation with the release of Hyrax 3.0.

cjcolvar avatar Nov 05 '19 21:11 cjcolvar

cc: @afred is there a contributor group for the documentation WG?

no-reply avatar Nov 05 '19 21:11 no-reply

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.

dewey4iv avatar Jul 30 '20 18:07 dewey4iv

@heathergreerklein Is this out-of-date? Looked at in SMIG.

acklose avatar Jun 24 '25 18:06 acklose