next-l / enju_leaf

Next-L Enju Leaf 統合図書館管理システム / integrated library system https://enju.next-l.jp/
https://www.next-l.jp
MIT License
119 stars 24 forks source link

特定のレコードの書誌をNDLサーチからインポートしようとするとWe're sorryとなる #610

Closed yegusa closed 9 years ago

yegusa commented 9 years ago

例えば http://iss.ndl.go.jp/books/R100000002-I000008276603-00

このレコードをNDLサーチからインポートしようとするとWe're sorry となります。 必ずどのレコードでもおきるのではなくて、いくつかの特定のレコードのみにおきます。

仮想マシンで、以下のbundle list の状況で発生することを確認しました。

vagrant@vagrant-ubuntu-trusty-64:~/enju$ bundle list | grep enju

log/production.log の一部は以下のとおり

D, [2015-05-06T07:01:28.310715 #1357] DEBUG -- : SOLR Request (5.1ms) [ path=update parameters={} ] D, [2015-05-06T07:01:28.312032 #1357] DEBUG -- : (0.4ms) rollback transaction I, [2015-05-06T07:01:28.330785 #1357] INFO -- : Completed 500 Internal Server Error in 2468ms F, [2015-05-06T07:01:28.335942 #1357] FATAL -- : NoMethodError (undefined method index' for nil:NilClass): vendor/bundle/ruby/2.2.0/bundler/gems/enju_biblio-a9efbc96913d/app/models/manifestation.rb:416:inblock in index_series_statement' vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/relation/delegation.rb:46:in map' vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/relation/delegation.rb:46:inmap' vendor/bundle/ruby/2.2.0/bundler/gems/enju_biblio-a9efbc96913d/app/models/manifestation.rb:416:in index_series_statement' vendor/bundle/ruby/2.2.0/bundler/gems/enju_biblio-a9efbc96913d/app/models/manifestation.rb:248:inblock in class:Manifestation' vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:443:in instance_exec' vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:443:inblock in make_lambda' vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:225:in call' vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:225:inblock in halting_and_conditional' vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in call' vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in_run_callbacks' vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in _run_touch_callbacks' vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/callbacks.rb:296:intouch' vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:295:in block in touch' vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:347:inblock in with_transaction_returning_status' vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in transaction' vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:220:intransaction' vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:344:in with_transaction_returning_status' vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:295:intouch' vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/no_touching.rb:49:in touch' vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/associations/builder/belongs_to.rb:92:intouch_record' vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/associations/builder/belongs_to.rb:103:in block in add_touch_callbacks' vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:443:ininstance_exec' vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:443:in block in make_lambda' vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:225:incall' vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:225:in block in halting_and_conditional' vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:219:incall' vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:219:in block in halting_and_conditional' vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:219:incall' vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:219:in block in halting_and_conditional' vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:incall' vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `_run_callbacks'

nabeta commented 9 years ago

591 の修正による不具合でした。修正済みで、ローカル環境で動作を確認しています。

yegusa commented 9 years ago

bundle update して、できることを確認しましたので、クローズします。

image

vagrant@vagrant-ubuntu-trusty-64:~/enju$ bundle list | grep enju