Skip to content

Incompatibilities with blacklight_advanced_search #58

@codeforkjeff

Description

@codeforkjeff

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions