I use this (very handy and great) module on my site to override the taxonomy term display for a particular vocabulary but have encountered an issue after upgrading to search api 7x1.9

Previous to updating to search api 1.9 the following set up worked 100%:
- On this vocabulary's taxonomy term page display settings the term display is assigned to Core and the Associated content display is handled by a search api view.
- The Search api view which displays the associated content contains the view itself with facet api
- On this view i've made sure that the path of this view is unique and does not try to override taxonomy/term/% (as instructed on https://drupal.org/node/1254890)
- The view pulls the contextual filter from the taxonomy term page's url
- When user selects facets the link was of the format taxonomy/term/11/customfacetname/facet

However after updating to search api 1.9, it looks as though something has changed.
The facet link which was previously working correctly as above now returns taxonomy/term/%25/customfacetname/facet

So it seems that the view is no longer able to read the contextual filter from the taxonomy term page's url

Things i've tried to diagnose:
if i go to the path assigned to the page view directly the facet paths work fine.

I have also narrowed this problem down to this module not agreeing with the new version of search api by disabling any other interacting modules with that particular page.

hoping someone can point me in the right direction.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

flocondetoile’s picture

Hi,

I met the same issue.
Have you found a solution ?

I try to use taxonomy views integrator instead of taxonomy display, and it works fine with the facets. But TVI has less options than taxonomy display.

arrubiu’s picture

Me too :(

drunken monkey’s picture

Status: Active » Needs review
FileSize
781 bytes

Hm, it looks like #2088905: Search API Views and Panels paths. might be the culprit here. Does the attached patch (applied to the search_api module, reverting the patch from that issue) work for you to fix the problem?
If that is the case, I guess we'll have to re-open that issue to find a solution which works for both use cases. Or maybe, if you say it works well with TVI, this module does something wrong in the Views integration?
In any case, please first test the patch to see if that's the problem.

Colin @ PCMarket’s picture

Thank you for the patch, i have applied the patch and this has restored the taxonomy display page to working order for me

drunken monkey’s picture

Status: Needs review » Needs work

Then maybe this module sets $view->override_path to a wrong value? It seems it sets it to the literal string taxonomy/term/%, instead of replacing the percent sign with the appropriate passed TID.

Colin @ PCMarket’s picture

yes i agree that is what is happening as well.

sin’s picture

Related Taxonomy Display issue with a patch attached:
https://drupal.org/comment/8453183#comment-8453183

codycraven’s picture

Status: Needs work » Closed (duplicate)

This does indeed seem to be a duplicate of #1783968: Exposed filters use the wrong URL when using Views overrides.

The fix has just been committed to 7.x-1.x. Please test the new code to see if the problem is resolved (if not re-open the discussion in #1783968).

Colin @ PCMarket’s picture

Sorry for the delayed reply, this issue only recently came up for me again after updating search api.

I updated taxonomy display to the latest dev which has resolved the reoccurrence of the above issue.

It has introduced another warning notice however:

Notice: Undefined index: use_view_title in TaxonomyDisplayAssociatedDisplayHandlerViews->displayAssociated() (line 60 of /../sites/all/modules/taxonomy_display/handlers/associated/views.inc).

end user’s picture

Notice: Undefined index: use_view_title in TaxonomyDisplayAssociatedDisplayHandlerViews->displayAssociated() (line 60 of /../sites/all/modules/taxonomy_display/handlers/associated/views.inc).

I've got the same error after trying out Harmony module with default install/modules. This is on a new install.

Notice: Undefined index: use_view_title in TaxonomyDisplayAssociatedDisplayHandlerViews->displayAssociated() (line 60 of /../sites/all/modules/taxonomy_display/handlers/associated/views.inc).

keaweb’s picture

Patch in #3 did solve my problem.
I am using facets on a commerce kickstart (7.x-2.19) site, in order to filter quite a big catalog. Facets did work for the catalog itself (a view page), but not when applied to taxonomy pages (with a view block). Generated links were incorrect (taxonomy/term).
I would appreciate this patch to be included in the module. This bug was really a pain for my client.

Can't thank drunken monkey enough.

rbosscher’s picture

FileSize
811 bytes

I was experiencing the same issue.
After upgrading to the dev the initial issue is resolved, So patch #3 is not necessary anymore.
But as @end-user said we now encounter a new notice.

Therefore I created the attached patch that should resolve that.

alexp999’s picture

Status: Closed (duplicate) » Reviewed & tested by the community

#12 working for me, be good to get that committed.

vbard’s picture

#12 works, hope to see that commited!

Chris Matthews’s picture

Version: 7.x-1.1 » 7.x-1.x-dev