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.
The count displayed is the number of revisions, not the number of articles (nodes). I don't think you want that.
How come?
When multiple node revisions are in the database, there are also multiple rows in the biblio_keyword table; one for each vid.
The join between biblio_keyword_data and biblio_keyword is the one that yields duplicate rows -one per vid- and makes the count go up.
Solution: use a subquery to get the correct node count per keyword (which only counts nodes in the {node} table, not all vids).
Comment | File | Size | Author |
---|---|---|---|
#1 | 741212.better.patch | 1.9 KB | roderik |
biblio-correct-nodecount.patch | 4.25 KB | roderik | |
Comments
Comment #1
roderikMan.........
When I was typing that last sentence "only counts nodes in the {node} table, not all vids"... it struck me how lame I am.
How do you only count rows in the {node} table?
You don't need to use a subquery. You can use INNER joins to the {node} table. DUH!
Forget the original patch. Use this one. Unless you're a masochist.
Comment #2
azin CreditAttribution: azin commentedI get this in Drupal 7.12, Biblio 7.x-1.x-dev as well
Comment #3
rjerome CreditAttribution: rjerome commentedFixed in both 6.x-2.x and 7.x
http://drupalcode.org/project/biblio.git/commit/23944ff
http://drupalcode.org/project/biblio.git/commit/81d846b