Closed (fixed)
Project:
Web Links
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Oct 2009 at 11:53 UTC
Updated:
15 Aug 2015 at 15:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
summit commentedSubscribing, having same need, that the block is filtered by category/taxonomy term.
Greetings, Martijn
Comment #2
jonathan1055 commentedYes, 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.
Comment #3
GStegemann commentedYes, we should not speed too much time on the 6.x code anymore.
Why not.
Comment #4
jonathan1055 commentedHere'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 addedis_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.Comment #6
jonathan1055 commentedThat'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.
Comment #9
jonathan1055 commentedThe patch has not changed, but automated testing should pass now.
Comment #12
jonathan1055 commentedAh, the version needs to be -dev I think, because those failures are from the 2.6 code
Comment #14
GStegemann commentedI took a while. Tested and works.
Comment #16
jonathan1055 commentedThank you.