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.

CommentFileSizeAuthor
#1 views_anyall.patch1.88 KBCrell
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Crell’s picture

Status: Active » Needs work
FileSize
1.88 KB

OK, 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.

dawehner’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
Status: Needs work » Patch (to be ported)

The 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

Crell’s picture

Yeah, 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. :-(

Crell’s picture

Status: Patch (to be ported) » Needs review

OK, 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.

dawehner’s picture

Status: Needs review » Patch (to be ported)

Update status back

Crell’s picture

Assigned: Crell » Unassigned
Chris Matthews’s picture

Issue summary: View changes
Status: Patch (to be ported) » Closed (outdated)

The 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