Closed (fixed)
Project:
Simple hierarchical select
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Apr 2013 at 15:44 UTC
Updated:
4 Apr 2020 at 11:02 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
stborchertYou need to use the filter "Content: Has taxonomy terms (with depth, Simple hierarchical select)" to make this work.
Otherwise views wouldn't know you would like to display users related to children of the selected term.
Comment #2
stborchertFeel free to reopen if this still is a problem.
Comment #3
silentbob commented"Content: Has taxonomy terms (with depth, Simple hierarchical select)" . This can't be found in a User View. Only Content View!
Comment #4
hefox commentedNeeds review implies there is a patch
Has taxonomy terms, as impled by it being under "content", is for nodes/content only
Comment #5
hefox commentedhttps://drupal.org/project/taxonomy_entity_index could integrate with that
Comment #6
johnlinux commentedhttps://drupal.org/project/taxonomy_entity_index still doesn't give you the option to have SHS. Did it work for you?
Comment #7
hefox commentedNo, shs would have to integrate with it as I said above
Comment #8
johnlinux commentedWell the dev version of shs works
Comment #9
silentbob commented@geyids Do you mean it works with user views or with taxonomy_entity_index ?
Comment #10
johnlinux commentedIt works with user views without taxonomy_entity_index.
Comment #11
silentbob commentedLatest Dev Version of SHS works for me with users. Remember also to set the widget type to shs on the tax reference field of user.
Comment #12
silentbob commentedLatest Dev Version of SHS works for me with users. Remember also to set the widget type to shs on the tax reference field of user.
Comment #13
hefox commented> "Content: Has taxonomy terms (with depth, Simple hierarchical select)"
> Remember also to set the widget type to shs on the tax reference field of user
Those are two different exposed filters
Comment #14
silentbob commentedNo i mean if you really set the the widget type in the user profile field, the option Simple Hierarchical Select appears, when you choose your taxonomy field as filter.
Comment #15
hefox commentedThis was re-opened because the "Content: Has taxonomy terms (with depth, Simple hierarchical select)" filter cannot be used, cause it is for the taxonomy_index table that only for content, e.g. node. So that continues not to be there, as it's for node.
Comment #16
Arrok commentedWorks in users, but as exposed filter it only takes in considerantion the deepest selected value, so I made a workaround it with jQuery.
the link for the exposed filter is something like this
mysite.com/?some_field=some_value&field_shs_test_tid=27
i took with jQUery my links and rewrote them with like this
mysite.com/?some_field=some_value&field_shs_test_tid[]=27,28,29,30
now considering that 28,29 and 30 are 27's children, it will now show me all that have 27,28,29 and 30 as deepest, so it shows 27 my selected and 28-29-30, it's children.
Don't really know how to make this from drupal, don't have the courage to update module files as i'm new to it but i know the phrase "never hack core".. i think the value for the parent in the select should me made equal to it's value+all it's children for a quick fix
Manage to fix the bellow :
But, my problem is that the exposed filter works alone, if i expose another filter doesn't matter if i make a group and place a "or" bewten them or just "and" (since the "user:active" is needed by default in my case), it returns 0
For my example, i made a category system with shs, and also i want to see my users not only by the category, but also by country (text field in user:profile) and if i search only by one works fine in both cases, if they are both present and you either "or" either "and" it does not show anything.
Don't know if it's from the exposed filter or from this https://drupal.org/node/2048599
Solution:
The problem is that i ahd 2 types of profiles "free and paid" so when making the relationship don't make 1 relationship with all the profile types selected. Make a relationship for each of them (for example i have 2 different retaionships, one for paid and one for free) and in "Configure relationship" put different "identifiers" for each of them and then update the fields that you want to be displayed or filter by from
" (Identifier1) Profile: Field name " to " (IdentifierX) Profile: Field name " where IndentifierX is the identifier for you relationship for the profile type where that field is.
Hope this helps.
Thnaks.
Comment #17
andreid commentedKnow it's been a long time but any news on this?
I have an user view with an exposed filter for taxonomy of County -> City. The City level is quite large and #16 fix couldn’t work.
Any thoughts on this?
All the best
Comment #18
stborchertReading through the comments it seems, using the latest development version of Simple hierarchical select in combination with Taxonomy entity index does the trick.
Comment #20
vasyok commentedIt possible to use SHS with user views in Drupal 8?