Hello!
I have a field collection with a taxonomy field with hierarchical terms:
-parent a
-- term a
-- term b
-parent b
-- term c
-- term d
I created a view of users with a relationship to the field collection and an exposed filter. My problem is, when I choose 'parent a' in the exposed filter the view has no results. What I want is that the items with 'term a' or 'term b' are shown.
How can I do this? Thanks in advance!!!
Katharina

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

romaingar’s picture

hi,
I've got the same question..
I would like to filter my view of node with taxonomy embeded inside a field collection.
I can load terms with differents ways (field collection/has taxonom term...) but no one can filter my view. do you have any solution to our problem ?
thanks.

mordek’s picture

I think I`ve got similar problem.
I`ve got User profile with fields (core) - example:
- field_profile_languages (field collection)
-- field_profile_languages_language (term reference)
--- field_language_code (text)
-- field_profile_languages_level (term reference)

I created view (type: User; about 2 weeks ago) where I added relationships:
-- field_profile_languages (field collection)
-- field_profile_languages_language (term reference)

So after these operations I could use ex. field_language_code as field.
Everything was ok. I started to do other things at page not related to this view. But today, after some updates I realized that this view is not working. I don`t know which update could mess up my view. I just think it is field collection.

Now I cannot choose field_profile_languages_language (term reference) in view relationships and also cannot add field_language_code (text) field.

My modules versions:
- Drupal Core 7.9
- Field collection 7.x-1.x-dev (from 24.11.2011)
- Views 7.x-3.0-rc3
- Entity API 7.x-1.0-rc1
- CTools 7.x-1.0-rc1

Thanks for future reply.

+1 Subscribe
;)

pinkonomy’s picture

I have the same issue,when I select a "Parent" on the exposed filter the view returns no results.How did you solve this?Thanks

kaizerking’s picture

I think any update of entity APi will affect Field collection because it is an entity , I am facimg similar problems with field collection , I have got a custom module developed to process field collection item fields. it worked well before two weeks. but recently it started showing errors.and we have again started work on the module

pinkonomy’s picture

Ι found a solution for this: I selected for the exposed filter :Has taxonomy term with DEPTH and set depth to 1.So now I can see results on the view when selecting the "parent".

etiennechataignier’s picture

Where do you select "has taxonomy term with depth" with field collection ?

pinkonomy’s picture

@echataig .When adding a new filter I think.

thoughtcat’s picture

I am having the same problem in version 7.x-1.0-beta4. I have a view with several taxonomy fields as exposed filters. All of these that are populated in the main node work fine, but none of those within the "field collection" return any results. There are definitely terms in the vocabulary. I originally had the field collection fields as part of the main node and they worked fine then.

Pinkonomy's solution (#5) doesn't work for me.

designcontext’s picture

#5 doesn't work for me too. Someone here with a good idea?

kaizerking’s picture

Hi folks the actual problem is Taxonomy views filter is not ported to D7, it means it is existing for name sake . just it is there,
please have a look here for any one to know the status Port Hierarchical Select Taxonomy Views (for exposed filters in Views) to Drupal 7

designcontext’s picture

Thanks for your reply! I read the thread, but I don't use Hierarchical Select. I use a normal selection widget for taxonomy.

I don't know if the problem is, that the taxonomy terms are not stored directly to the user entity. I have users, two profile types and in one profile I use a field collection and the taxonomy field is part of it.

In the user view I make a relationship to the profile and to the field and can then use it for filtering, but with the problem mentioned above. I have no option "Has taxonomy term" or something with depth. Maybe it would be possible to move the terms from the field to the user entity? But I don't have an idea how to do this.

dchatry’s picture

Subscribing

egfguedes’s picture

I have the same problem.
None taxonomy field, created by a field collection in a major node, insert the term in the taxonomy.
In this way, appears like, the major node, don't receive the tag, and the vocabulary don't related to major node.

Field collection it's a great module, but don't work fine with taxonomy yet, a great problem in some cases (my case, i.e. :)

Anybody got a solution?

delister’s picture

Hi! I have created a module (https://github.com/delister/taxcfcs). It adds a new filter in views (Has taxonomy terms (with depth; taxfcs)) |). And with it you can search on the term taxonomy node is reachable via a Field Collection. Also according to depth. And at the same time have the opportunity to set a positive and a negative depth.

PS sorry for my english.

GBain22’s picture

For anyone who hasn't done this - my need for Field Collection was not needed once I used hierarchical select and the module that delister posted above and it allowed me to use the fact that I had:

Parent A
-- child A
-- child B

Parent B
-- child A
-- child B

As hierarchical select allows you to navigate through from parent to child so I no longer needed to combine 2 seperate taxonomy fields into 1 field.

I people will need completely seperate terms combining for field collection - but it's useful to know that it works when you don't.

GBain22’s picture

Issue summary: View changes

additional information

TanvirAhmad’s picture

Issue summary: View changes

Subscribeing.

vishal.sheladiya’s picture

Below are the steps to use your field collection taxonomy field into exposed filter.

step1 - create a content view.
step2 - add your field collection taxonomy field into relation.
step3 - also add same field into filter criteria and set it as exposed filter.

now your taxonomy dropdown should be appear with working condition.

BDuell’s picture

#17 worked great. Thank you vishal!

janu01’s picture

Hi,

As said in #17, it is working for only single selection and multiple selection of taxonomy terms are not working.
Is there any other way for doing multiple select.

oemb29’s picture

I use SHS and Views module and works perfect but Field Collection Module is wrong because 'has taxonomy term (WIDTH DEPTH option is not present for taxonomy

field_problem_no_has_depth_taxonomy_term.png

How can I display items with "Upstream" term (see image) using filters with Views if is not available "has taxonomy term (width depth)" filter with Field Collection Item?

I need to select child term to display result but is not logical

Any solution?