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

NameError in SearchBuilderBehavior when a facet has json: true #3487

Open
sandbergja opened this issue Jan 8, 2025 · 0 comments
Open

NameError in SearchBuilderBehavior when a facet has json: true #3487

sandbergja opened this issue Jan 8, 2025 · 0 comments

Comments

@sandbergja
Copy link
Contributor

Steps to recreate

  1. Follow these steps to get a local Blacklight
  2. Go to http://localhost:3000/catalog/facet/language_ssim
  3. Note that you get the language facet values as expected
  4. In .internal_test_app/app/controllers/catalog_controller.rb, change:
    config.add_facet_field 'language_ssim', label: 'Language', limit: true
    
    to
    config.add_facet_field 'language_ssim', label: 'Language', limit: true, json: true
    
  5. Go back to http://localhost:3000/catalog/facet/language_ssim
  6. Note that you get an internal server error!

Error message

NameError (undefined local variable or method `solr_parameters' for #<SearchBuilder:[...]

        add_solr_facet_json_params(solr_parameters, facet, facet_config, limit: limit + 1, offset: offset, sort: sort, prefix: prefix)
                                   ^^^^^^^^^^^^^^^
Did you mean?  solr_params):

/Users/sandbergj/repos/blacklight/lib/blacklight/solr/search_builder_behavior.rb:264:in `add_facet_paging_to_solr'
[...]

I suspect that the "Did you mean" is correct, solr_parameters should be solr_params, although just making that change does not actually cause the facet values to show up for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant