Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Incompatibilities with blacklight_advanced_search #58

Open
codeforkjeff opened this issue Dec 12, 2016 · 0 comments
Open

Incompatibilities with blacklight_advanced_search #58

codeforkjeff opened this issue Dec 12, 2016 · 0 comments

Comments

@codeforkjeff
Copy link

I encountered two issues when using both this plugin and blacklight_advanced_search.

  1. The range limit facet contains a form element, which gets nested inside the advanced search form, causing submission to not behave correctly (the search button seems to get detached from any form at all, and doesn't do anything when clicked). I haven't figured out a solution or workaround for this.

  2. The advanced search page fails to render _range_limit_panel.html.erb with this error:

No route matches {:action=>"index", :controller=>"advanced", :range_end=>"2008", :range_field=>"pub_date", :range_start=>"1941"}

This is because #link_to on line 70 of that partial can't generate a URL for that route, because it's an engine route. This also happens with the #link_to on line 82.

Overriding the partial and adding an explicit 'controller' and a 'use_route' param generates incorrect URLs (possibly a Rails bug?). The workaround is to add these manual entries to routes.rb file:

get 'advanced' => 'advanced#index'
get 'advanced/range_limit' => 'advanced#range_limit'
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant