Modr8 block is showing a wrong number of posts in moderation queue.
I've found the error is generated in the query modified by the presence of the node_access module.
I've only one moderated post, but the block shows I've 3.
Once "db_rewrite_sql" (either in the block and page functions) is called, the query generated is:

SELECT COUNT(*) FROM {node} n INNER JOIN {node_access} na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 2 AND na.realm = 'nodeaccess_rid') OR (na.gid = 14 AND na.realm = 'nodeaccess_rid') OR (na.gid = 7 AND na.realm = 'nodeaccess_uid') OR (na.gid = 7 AND na.realm = 'nodeaccess_author'))) AND ( n.status = 1 AND n.moderate = 1) 

The result is 3 rows...

I've not so deep knowledge to investigate the issue.

Comments

mike1966’s picture

Oops, small correction. the table node_access accessed, is from the core of drupal, not from the nodeaccess module

pwolanin’s picture

perhaps that should be instead COUNT(DISTINCT(nid))

jean-bernard.addor’s picture

Is that forum topic a duplicate:
http://drupal.org/node/300937

mike1966’s picture

It doesn't seem the same topic.
So far I remember, the http://drupal.org/node/300937 issue, was related to the format_plural call.

I tried the suggestion of pwolanin. It works, with a small correction: COUNT(DISTINCT(n.nid))

Thanks pwolanin