When I create the Popular, Recent blocks for a specific group, they are identical to the popular and recent blocks for the top of that vocabulary's taxonomy, rather than reflecting that specific category's (group's) most popular and recent links.

CommentFileSizeAuthor
#4 595560_4.popular_plus_term.patch852 bytesjonathan1055

Comments

summit’s picture

Subscribing, having same need, that the block is filtered by category/taxonomy term.
Greetings, Martijn

jonathan1055’s picture

Issue summary: View changes

Yes, this is still a bug for 'Popular+Term', however 'Recent+Term' does work OK in 6.x-2.6

We fixed the code in _weblinks_get_query in 7.x on #2406433: Popular 'term' content does not filter on the term, then converted the the query to a db_select.
I do not propose to do too much on the 6.x code but I could simply add the couple of lines to fix the Popular+Term block.

GStegemann’s picture

I do not propose to do too much on the 6.x code

Yes, we should not speed too much time on the 6.x code anymore.

but I could simply add the couple of lines to fix the Popular+Term block.

Why not.

jonathan1055’s picture

Status: Active » Needs review
StatusFileSize
new852 bytes

Here's a patch to fix 'Popular + Term'. The 'Recent + Term' was working ok but it was maybe by luck. The test if ($tid != 0) was giving FALSE when $tid = 'recent' which is what we wanted, but just to make it clear I have added is_numeric($tid) becuase this join and where should only be done if we are filtering on a term id. The SQL would fail if a character string for $tid was substituted in the WHERE clause, as we discovered in 7.x.

Status: Needs review » Needs work

The last submitted patch, 4: 595560_4.popular_plus_term.patch, failed testing.

jonathan1055’s picture

Version: 6.x-2.3 » 6.x-2.6
Status: Needs work » Needs review

That's odd, I did not think that 6.x patches would have automatic testing attempted via simpletest. Another recent 6.x patch just had 'test queued' and nothing more, see https://qa.drupal.org/pifr/test/1100928
Maybe it depends on the version assigned to the issue - that one was -dev, this issue is 6.x-2.3 which is out of date. I will change it 6.x-2.6 and see what happens.

Status: Needs review » Needs work

The last submitted patch, 4: 595560_4.popular_plus_term.patch, failed testing.

jonathan1055’s picture

Status: Needs work » Needs review

The patch has not changed, but automated testing should pass now.

Status: Needs review » Needs work

The last submitted patch, 4: 595560_4.popular_plus_term.patch, failed testing.

jonathan1055’s picture

Version: 6.x-2.6 » 6.x-2.x-dev

Ah, the version needs to be -dev I think, because those failures are from the 2.6 code

Status: Needs work » Needs review
GStegemann’s picture

Status: Needs review » Reviewed & tested by the community

I took a while. Tested and works.

  • jonathan1055 committed 2d1a2f6 on 6.x-2.x
    Issue #595560 by jonathan1055: Popular and Recent Blocks only reflect...
jonathan1055’s picture

Status: Reviewed & tested by the community » Fixed
Related issues: +#2406433: Popular 'term' content does not filter on the term

Thank you.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.