Similar problems with forum.module, when some node access module is used, were already reported and fixed - see http://drupal.org/node/11871

When using forum.module with taxonomy_access.module and multiple roles, I've encountered two more places which need DISTINCT() in queries - topic counts in forums listing, and new comments count in topic listing. Here's a patch which fixes them.

CommentFileSizeAuthor
forum_fix_counts_with_node_access.patch2.47 KBmenesis

Comments

Steven’s picture

This sounds like it needs to be fixed by calling db_rewrite_sql() instead.

menesis’s picture

I should have been more clear - this problem and patch is for DRUPAL-4-5. In HEAD this is correct already.

praseodym’s picture

Status: Needs review » Closed (fixed)