Search API Views and Panels paths redux

Tech Notes

Carrying on with the Panels, Views, Search and Facets theme I had to revisit this recently.

This time the issue is again Facets on a non-search Panel.

  1. I can get Facets working well in Panels.
  2. I can get Facets displaying in a non-search Panel using Views/Panels Context.
  3. I couldn't get the path for the Facets to point to anything other than 1) the current (non-search) Panel or 2) the SearchAPI View page. Neither of these are correct (it needs to be the Views enabled Panel).

eg:

  1. Views (SearchAPI) at 'query'.
  2. Panels page (with View and Facets) at 'search'.
  3. Non search Panels page (with Views Context and Facets) at 'node/1000'.

Everything works well except the paths that FacetAPI generates are pointing to node/1000 or (with the patch from here) to 'query' (the original View page). The patch sets search_api_base_path.

Looking for options I discovered the Views settings for Panels which allows Panels to override the URL of the View.
View > Displays > Content pane
Pane settings > Allow settings > Path override

 

[[{"fid":"514","view_mode":"gallery","type":"media","attributes":{"height":625,"width":1020,"class":"media-element file-gallery"}}]]

And in Panels 
Panel > Settings > Override path

[[{"fid":"515","view_mode":"gallery","type":"media","attributes":{"height":1099,"width":1020,"class":"media-element file-gallery"}}]]

 

This looked promising but didn't work (no change). Looking through the code I couldn't see anywhere that linked up Path override with base_path. I've created a patch that achieves that, passing the overridden path all the way through to the Facet generation. 

https://drupal.org/node/2088905