Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#20 | field_problem_no_has_depth_taxonomy_term.png | 5.58 KB | oemb29 |
Comments
Comment #1
romaingar CreditAttribution: romaingar commentedhi,
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.
Comment #2
mordek CreditAttribution: mordek commentedI 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
;)
Comment #3
pinkonomy CreditAttribution: pinkonomy commentedI have the same issue,when I select a "Parent" on the exposed filter the view returns no results.How did you solve this?Thanks
Comment #4
kaizerking CreditAttribution: kaizerking commentedI 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
Comment #5
pinkonomy CreditAttribution: pinkonomy commentedΙ 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".
Comment #6
etiennechataignier CreditAttribution: etiennechataignier commentedWhere do you select "has taxonomy term with depth" with field collection ?
Comment #7
pinkonomy CreditAttribution: pinkonomy commented@echataig .When adding a new filter I think.
Comment #8
thoughtcat CreditAttribution: thoughtcat commentedI 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.
Comment #9
designcontext CreditAttribution: designcontext commented#5 doesn't work for me too. Someone here with a good idea?
Comment #10
kaizerking CreditAttribution: kaizerking commentedHi 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
Comment #11
designcontext CreditAttribution: designcontext commentedThanks 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.
Comment #12
dchatrySubscribing
Comment #13
egfguedes CreditAttribution: egfguedes commentedI 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?
Comment #14
delister CreditAttribution: delister commentedHi! 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.
Comment #15
GBain22 CreditAttribution: GBain22 commentedFor 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.
Comment #15.0
GBain22 CreditAttribution: GBain22 commentedadditional information
Comment #16
TanvirAhmad CreditAttribution: TanvirAhmad as a volunteer commentedSubscribeing.
Comment #17
vishal.sheladiya CreditAttribution: vishal.sheladiya as a volunteer and commentedBelow 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.
Comment #18
BDuell CreditAttribution: BDuell commented#17 worked great. Thank you vishal!
Comment #19
janu01 CreditAttribution: janu01 commentedHi,
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.
Comment #20
oemb29 CreditAttribution: oemb29 commentedI 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
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?