MrDys / blacklight

Blacklight Plugin
http://projectblacklight.org/
Other
1 stars 1 forks source link

index.atom.builder crashes #530

Open MrDys opened 12 years ago

MrDys commented 12 years ago

CODEBASE-349: Loading catalog.atom yields:

NoMethodError in Catalog#index

Showing /Users/jamesws3/.rvm/gems/ruby-1.8.7-p334@blacklight/gems/blacklight-3.0.0pre8/app/views/catalog/index.atom.builder where line #20 raised:

undefined method `has_next?' for #Array:0x102e671e0 Extracted source (around line #20):

17:
18: xml.link( "rel" => "next", 19: "href" => url_for(params.merge(:only_path => false, :page => (@response.docs.current_page() + 1).to_s)) 20: ) if @response.docs.has_next? 21:
22: xml.link( "rel" => "previous", 23: "href" => url_for(params.merge(:only_path => false, :page => (@response.docs.current_page() - 1).to_s)) Rails.root: /Users/jamesws3/code/bl_demo

Application Trace | Framework Trace | Full Trace Request

MrDys commented 12 years ago

Original reporter: tastyhat

MrDys commented 12 years ago

cbeer: Pushing to 3.2 release. The error was fixed in the 3.0 release, but the tests need further modifications to the solr document mocking framework.

MrDys commented 12 years ago

cbeer: I've fixed the error, but cannot fix the test to ensure it fails appropriately. Until then, this bug should be left open, I suppose.

the index.atom.builder spec file does some work to provide fixtures data to avoid hitting solr, but it seems like the data structure it mocks is actually different than the current RSolr response (and also contains different data than the current Blacklight demo solr does).

MrDys commented 12 years ago

jrochkind: Were your fixes before or after the 3.0 release?

At any rate, at this point we should move the issue to milestone 3.1, yes? Since 3.0 is released, doens't make sense to have any open tickets assigned to it.

MrDys commented 12 years ago

cbeer: I fixed the bug before the 3.0 release, but the tests are unchanged and may still give false passes.

MrDys commented 12 years ago

jrochkind: Moving to 3.1, as 3.0 is released so should have no open tickets. outstanding issue is fixing tests for Atom action (maybe giving up on using a mocked response and making it live solr again?)