I've just noted that the taxonomy filters are currently not working with views fusion. This is, because add_table() is now caring about table_aliases, but the taxonomy filters are using a custom $joininfo with already aliased tables - which leads to double aliased tables..
Attached is a patch which adds a 'alias' => '' to the custom $joininfos, so that the alias won't be added another time.

Furthermore I noted that the filter code is joining term_hierarchy one time even if the depth is set to 0. I just added a ($depth > 0) check around this code, which has improved the performance on my test site with a lot term_hierarchies considerable!

Attached is patch which fixes both. It also applies to 5.x (with offset).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fago’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev
Status: Active » Needs review
FileSize
1.59 KB

In the meanwhile a similar performance improvement has been committed, so here is the views fusion taxonomy fix only... attached

fago’s picture

Title: taxonomy filters improvements and views fusion compatibility » taxonomy views fusion compatibility

fixed title

merlinofchaos’s picture

Status: Needs review » Fixed

Applied.

Anonymous’s picture

Status: Fixed » Closed (fixed)
llribas’s picture

Priority: Normal » Critical
Status: Closed (fixed) » Needs review

Hi,

I'm getting crazy about this problem... my fusion views don't show taxonomies! when I fuse a view A (primary) (2 fields and it's exposed filters are from taxonomy) with view B (1 field and it's exposed filter are from taxonomy), the taxonomy from B gets lost. The filters on that taxonomy are obviously not working too. The views and it's filters works fine before the fusion.

my versions:
- drupal 5.14
- cck 1.10 (patch for nodereference for viewsfusion applied: http://drupal.org/node/123482#comment-1012300)
- content taxonomy 1.x-dev (the last)
- views 1.6 (last version, wich alredy applied patch http://drupal.org/node/125849)
- views fusion 1.2

It looks like the problem discused in http://drupal.org/node/125849, since the warning is:

user warning: Unknown column 'v21v21term_node.tid' in 'on clause' query: SELECT count(node.nid) FROM node node LEFT JOIN content_type_actividad node_data_field_institucion ON node.vid = node_data_field_institucion.vid LEFT JOIN node v21node ON node_data_field_institucion.field_institucion_nid = v21node.nid LEFT JOIN term_node v21term_node ON v21node.nid = v21term_node.nid LEFT JOIN term_hierarchy v21term_hierarchy ON v21v21term_node.tid = v21term_hierarchy.tid LEFT JOIN content_field_logo_institucion v21node_data_field_logo_institucion ON v21node.vid = v21node_data_field_logo_institucion.vid WHERE (node.status = '1') AND (node.type IN ('actividad')) AND (v21node.status = '1') AND (v21node.type IN ('institucion')) AND (v21term_node.tid = '53')

but I can't figure out why this happens since the changes mentioned in http://drupal.org/node/125849 are applyed and it's suposed to solve the double aliased problem (I think).

I noted that, in view B, I can use the field "Taxonomy Field" (from content taxonomy module), and then it appears in fused view (but then I can't have exposed filter on it). But when I use the regular field "Taxonomy Term:" it don't appear in the fused view. (I tried with no content taxonomy fields in the content type, and the behaviour is the same).

Help will be appreciated!!!

many thanks,

llribas

llribas’s picture

Status: Needs review » Closed (fixed)

Ok, I think it's solved, finally I found the issues.
For me the problem was the mix of 2 problems:

  1. http://drupal.org/node/142714
  2. http://drupal.org/node/125849 (this issue page)

I applied both and everything ok!
The first solve the problem showing taxonomies in a fused view (the taxonomies from the secondary view).
The second une solves the taxonomy exposed filters in a fused view.

Thanks Fago