Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The custom_search_submit() function redirects the search based on what the user selects in the dropdown (i.e. "Site content", "Users"). The problem is that the redirect doesn't respect the "path" key set in the search module's hook_search_info() implementation. This is a problem for contributed modules such as Faceted Navigation for Search that use a different path than their module name. In this example the expected search path is "search/content", however this module redirects to "search/search_facetapi".
Comment | File | Size | Author |
---|---|---|---|
#1 | search-redirect-fix-1870868-1.patch | 1.49 KB | cpliakas |
Comments
Comment #1
cpliakas CreditAttribution: cpliakas commentedThe attached patch modifies the logic to take the "path" key into account when redirecting to the appropriate search page.
Thanks
Chris
Comment #2
jpontani CreditAttribution: jpontani commentedAside from screwing up the commit message, this has been applied.
http://drupalcode.org/project/custom_search.git/commit/68e633c