undefined local variable or method `facet_field_labels'
Closed this issue · 6 comments
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.
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.
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.
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.
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?)
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!