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.
Currently, the default argument plugin for "Taxonomy term ID from URL" lets you pull taxonomy terms from a node in the URL instead. This is great for doing "related nodes" blocks, as the labeling says. However, it's currently hard coded to interpreting multiple terms as "has all terms", not "has any term". That should be made configurable so that nodes with lots of terms don't end up with nothing that's related to them. :-)
I'm going to give this a shot, so assigning to me.
Comment | File | Size | Author |
---|---|---|---|
#1 | views_anyall.patch | 1.88 KB | Crell |
Comments
Comment #1
Crell CreditAttribution: Crell commentedOK, this is as much as I can do right now. Unfortunately it doesn't work yet. The net result from this patch is that you can change the query from "WHERE taxonomy_index.tid='1,2,3'" to "WHERE taxonomy_index.tid='1+2+3'". However, neither of those queries should work at all given that tid is not a string column, yet for some reason the commas work while the + does not.
I'm confused, but do not have any more time to work on this issue sadly. :-( Hopefully someone else can drive it home.
Comment #2
dawehnerThe patch looks fine in general.
The bug you report about the non working connection of multiple terms seems to be a problem of your configuration.
On your contextual filter under "more" you can find "Allow multiple values".
With this settings and distinct enabled it works as expected.
This patch should be backported to 6.x-3.x
Comment #3
Crell CreditAttribution: Crell commentedYeah, I checked after posting this and I didn't have that setup right when I thought I did. I've not tried the patch with that setting checked yet, and I don't know that I will be able to do so in the near future. I also don't know that I'll be able to do a D6 backport as the project funding it is D7. :-(
Comment #4
Crell CreditAttribution: Crell commentedOK, I've confirmed that it does work in D7 after I configure the View properly. The only catch is that the title of a resulting View page becomes "nodes tagged tag1+tag2+tag3". I think that's a separate issue, however.
Comment #5
dawehnerUpdate status back
Comment #6
Crell CreditAttribution: Crell commentedComment #7
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue