Closed (duplicate)
Project:
Search API
Version:
7.x-1.x-dev
Component:
Views integration
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Dec 2012 at 15:52 UTC
Updated:
24 Mar 2015 at 12:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dasjothe attached patch will set search_api_base_path for any search api view, if it isn't set manually.
hope this makes sense, please see the above issue + its linked predecessors for details :)
Comment #2
dasjoops, here's the patch
Comment #3
dasjodigging into the views api turns out, it might be better to use
get_urlinstead ofget_path, as this one should contain arguments as well.Comment #4
dasjowe have fixed this within pretty paths, see #1861786: Fix base path issues
Comment #5
queenvictoria commentedI'd love for this to be reopened. In fact I'll do that. I've looked high and low for a solution to my situation. I'm happy if someone can tell me that I've gone about this all wrong.
The situation is that I needed facets on a non-search panels page. I've read a lot about how to do this and did have facets appearing (using various techniques but finally settling on Views Context). But the paths that the Facets used always inherited the Panels path. With the above page in #3 this resolved correct to the Views path.
Here is my method. The reason this patch works that this allows search_api_views to set the search_api_base_path. Why does this help? It's a View that is providing the context for the Facets.
So to implement. Much of this is taken from http://drupal.org/node/1066278#comment-4405704.
views search_api search_api_views search_api_solr facetapi search_api_facetapi views_content panels)View rowas the type. Put it at the top above Facets. I'm still figuring out how to hide the actual context.Comment #6
queenvictoria commentedI'm working on a different approach over here which allows the Panel to override the View path providing a (potentially) third path.
https://drupal.org/node/2088905
Comment #7
kopeboyI cannot get this to work.
I am using a View: Content Pane with Contextual filter: Search taxonomy term fields, and putting that on a Panel page (taxonomy term template) with path taxonomy/term/%term, then placing the Search API index View content pane and the Facets.
> The facets don't work, on click I get error:
EntityMalformedException: Missing bundle property on entity of type taxonomy_term. in entity_extract_ids() (line 7746 of /srv/bindings/8036422060ee456b87e0ee13c0f08bad/code/includes/common.inc).Should this work?
Why I want to use panels:
1) I want the taxonomy terms linked to the search page for their vocabulary
2) I want to place other elements in that search page, for example the term description & image, but also another view of ads or a map
3) different users would see different things
Comment #8
drunken monkeyDoes it work on a normal view, without the Panel page? This error looks weird, and not like it would be caused by Panels. On the other hand, it might be a problem with the URL/path. Are you maybe using Facet API Pretty Paths or something for your facets?
Comment #9
kopeboyIt works on a normal View. I am using pretty paths, but I did not test with this patch yet.
Comment #10
drunken monkeyLet's discuss base path-related problems in #2159827: Fix search base path in Facet API adapter and #1861786: Fix base path issues.
Comment #11
akalam commented#3 does not apply against the current -dev.
Here is an attached patch that apply