Posted by dasjo on September 7, 2012 at 11:10am
5 followers
| Project: | Search API |
| Version: | 7.x-1.x-dev |
| Component: | Facets |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
relying on $_GET['q'] for determining base paths is quite hacky.
for example in the Facet API Pretty Paths module needs to mock a base path in order to work properly.
we should find other ways to determine base paths
Comments
#1
i have attached a patch that fixes the problem.
see the according facetapi pretty paths issue that depends on this change: #1777714: Don't modify the query path
note, that the patch doesn't remove all usages of $_GET['q'] but just the one that i found causing errors
#2
I tested this with a solr backend and it seems to work fine... This plus the associated facetapi_pretty_paths patch is a lifesaver, as the associated problems with views pagers are pretty unpleasant to deal with.
#3
Seems to work great, thanks!
Committed.
#4
Automatically closed -- issue fixed for 2 weeks with no activity.
#5
The fix is using menu_get_item() to determine the current page url. This only works if the current page has a menu link. In my case I use page manager to show different search types:
example:
searchandsearch/nodes... for a search on node index (default)search/files... for a search on file indexI set the path in page manager to
search/!type, where the type-Argument is optional. The resulting menu_link path issearch. On top of this I created two different panel variants using the type argument as criteria to define which search page should be shown (node or file search). The path of menu_get_item() will always be just search, the facets always will link to /search - although the user might be on the search/file page.My workaround: I created two pages instead of two variants to get it work with menu_get_item().
#6
See #1827272: Facet path can be incorrectly returned for further discussion.
And you shouldn't post into closed issues without re-opening them – this reduces your comment's chances of being seen to practically 0.