Closed (fixed)
Project:
Views Hacks
Version:
7.x-1.x-dev
Component:
Views Filters Selective
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Jul 2012 at 16:56 UTC
Updated:
23 Jul 2017 at 06:44 UTC
Jump to comment: Most recent
Comments
Comment #1
imevul commentedSounds a lot like this issue: http://drupal.org/node/1608498
Perhaps you can work with the supplied patch in that thread to get the taxonomy terms working.
Comment #2
funkytraffic commentedAs said in this thread it does not work yet, although it is the correct solution for this problem. Therefore this is a duplicate considering that in my case it is about taxonomy terms and not node references.
It would be nice to have a hint on the project page that this alpha is not ready for usage in certain parts of this module. It took me ages to find out about this.
Besides I would like to see this function as a filter option in views since it is a very obvious goal.
Comment #3
infojunkieMarking as duplicate of #1608498: Selective filters show node id instead of title when filtering on node reference fields, where the community is working to produce a patch.
Comment #4
danielnolde commentedSorry, this doesn't seem to be a duplicate with the narrow and node-specific direction #1608498 takes.
The proposed patch there is a no solution for the problem discussed here, since it is too node specific.
What about taxonomy based filters on term_reference fields for a taxonomy based view?
A lot of use cases are not based on nodes in Drupal 7.
We need a solution that isn't dependent on a specific base table (like node) but solves this bug in general.
Comment #5
pzhe commentedI've made the following changes in views_handler_filter_selective.inc (based on ideas in http://drupal.org/node/1608498):
The exposed filter shows term names for term referencing fieds and it works correctly for numeric fields.
Also it fixes a bug "Actual values will be available at run-time".
Comment #6
damaged45 commentedHello phze,
I applied the code but still showing tid. Is there anything I need to change on your code?
Thanks,
Comment #7
pzhe commentedThe code changes tids on term names if the condition ($this->definition['proxy'] == 'views_handler_filter_term_node_tid') is true.
You may try to omit the corresponding if(...):
But you may have problems with selective filters based on numeric fields.
Note that my selective filters are represented in a block by Better Exposed Filters module.
Comment #8
funkytraffic commentedSeems there is a new module planning to do the same:
http://drupal.org/project/viewsextras
Comment #9
khalor commentedThe code in #5 fixes this issue for me.
Comment #10
casaran commentedThe code in #5 also worked for me.
Thank you for it.
Comment #11
khalor commentedCan we get this into dev branch?
Comment #12
quickly commented#5 worked for me. Thanks!
Comment #13
3cwebdev commentedSeconding the request to get this fix committed to dev. It works perfect for me on multiple sites.
Comment #14
infojunkieCommitted to latest dev, although I'm not crazy about the patch, because it hard-codes a special case in an otherwise generic code block. But as long as it helps the folks here...
Comment #15.0
(not verified) commentedInfo
Comment #16
mahpari commentedGuys, I have got this problem in drupal 8.3.5, is there any solution for it!?
Regards