projectblacklight / blacklight_advanced_search

Advanced search plugin for Blacklight
http://projectblacklight.org
Other
24 stars 25 forks source link

undefined local variable or method `facet_field_labels' #16

Closed awead closed 10 years ago

awead commented 10 years ago

This affects the blacklight5 branch:

Visit advanced_search_path Enter a search term in any of the text boxes Select a facet using one of the checkboxes Click "Search" I get "undefined local variable or method `facet_field_labels'"

I can search multiple text fields, such as title, name, subject, or any of the other ones I've defined. It just doesn't like adding in facets to the mix.

jrochkind commented 10 years ago

hmm, this is a problem I thought I already fixed in the blacklight5 branch.

Can you make sure you are using the latest blacklight5 branch? If you have a :git in your Gemfile for blacklight_advanced_search, you may need to run bundle update blacklight_advanced_search to refresh from git and update your Gemfile.lock to latest from git.

jrochkind commented 10 years ago

I can't find the string facet_field_labels anywhere in the source for current blacklight5 branch; I'm thinking you are not using latest.

awead commented 10 years ago

Yes, that is likely. Sorry I didn’t try that out first… However, I just did and it’s asking for BL 5.1. I still need to use 5.0. Is is possible for it work with 5.0 and 5.1?

bundle update blacklight_advanced_search

Bundler could not find compatible versions for gem "blacklight": In Gemfile: blacklight (~> 5.0.0) ruby

blacklight_advanced_search (>= 0) ruby depends on
  blacklight (5.1.0)

…adam

On Feb 26, 2014, at 1:11 PM, Jonathan Rochkind notifications@github.com wrote:

I can't find the string facet_field_labels anywhere in the source for current blacklight5 branch; I'm thinking you are not using latest.

— Reply to this email directly or view it on GitHub.

awead commented 10 years ago

commit 3e2525bf57bc423130a2de80b029feb5c21e6567 requires BL 5.1.

jrochkind commented 10 years ago

Hi Adam.

Oops, sorry. It was becoming challenging to keep blacklight_advanced_search working with all versions of BL5.

We could have tried to maintain a version for 5.0 and another version for 5.1+, which is challenging when we still haven't even got any 5.x version complete yet. Or we could use some hacky code to try and make the same version work with both, but it got tricky.

After talking to jcoyne and cbeer in IRC, it seemed it made sense that it would be okay for the blacklight_advanced_search for 5.x to require 5.1 minimum, we didn't think there'd be anyone who needed to use 5.0.

I guess we were wrong there. Goes to show what a really complex issue backwards compat is, I guess. BL's constantly moving target does make things challenging sometime.

You could try to make a bl5.0 branch that goes back to not use the 5.1 stuff and use only 5.0 stuff, and we would end up releasing different versions for 5.0 and 5.1 I guess. If we need to. I suspect just getting your app to 5.1 would be easier. I'm not interested in doing that work myself, I'm still just trying to get the 5.1-compat one out the door!

(Any reason we are discussing this here instead of on the issue you created?)

awead commented 10 years ago

I think it's fine to keep it with version 5.1 and what would make the most sense for me is to bring my application up to speed with 5.1.

Thanks for your help!