Skip to content
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

NoMethodError: undefined method `value' for #<Nokogiri::XML::Element:0x000000033ad650> #24

Open
drh-stanford opened this issue Nov 7, 2016 · 0 comments
Labels

Comments

@drh-stanford
Copy link

drh-stanford commented Nov 7, 2016

We're seeing an error in production for dor_indexing_app:

NoMethodError: undefined method `value' for #<Nokogiri::XML::Element:0x000000033ad650>

See https://github.com/sul-dlss/dor-rights-auth/blob/v1.2.0/lib/dor/rights_auth.rb#L257

Here were the request parameters from Honeybadger:

{
  "commitWithin" => "10000",
  "controller" => "dor",
  "action" => "reindex",
  "pid" => "druid:bd909yc5623"
}
failure at rights_auth.rb 257 extract_index_terms(...)
[GEM_ROOT]/gems/dor-rights-auth-1.2.0/lib/dor/rights_auth.rb:257:in `extract_index_terms'

The current rightsMetadata datastream is:


<rightsMetadata>
  <access type="discover">
    <machine>
      <world></world>
    </machine>
  </access>
  <access type="read">
    <machine>
      <location rule="no-download">music</location>
    </machine>
  </access>
  <use>
    <human type="useAndReproduction">Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Stanford Archive of Recorded Sound at [email protected].</human>
  </use>
  <use>
    <human type="creativeCommons"></human>
    <machine type="creativeCommons"></machine>
  </use>
</rightsMetadata>

but it doesn't have a group element. I looked back in the version history and found one with that element:


<rightsMetadata>
  <access type="discover">
    <machine>
      <world></world>
    </machine>
  </access>
  <access type="read">
    <machine>
      <group rule="no-download">music</group>
    </machine>
  </access>
  <use>
    <human type="useAndReproduction">Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Stanford Archive of Recorded Sound at [email protected].</human>
  </use>
  <use>
    <human type="creativeCommons"></human>
    <machine type="creativeCommons"></machine>
  </use>
</rightsMetadata>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant