Using (among several other contrib modules)

  • Forum
  • Locale
  • Advanced Forum
  • Internationalization

My forum topic nodes are set to be localized and I've set translations for the Forum Vocabulary and all the terms. The forums work well with Internationalization after I modified some of the views and added a 'Content: Language (= Current user's language)' filter.

However the Topics count in the main forum page is incorrect, it doesn't take into account the language, so we see a higher count than we should.

For example: https://freshwaterwatch.thewaterhub.org/forum

The 'Meet & Greet' forum has five topics but when you enter you only see two topics: https://freshwaterwatch.thewaterhub.org/forums/meet-and-greet

What happens is that if you click on the French language you see one and two more in the Spanish language, that's why the count for the forum is 5 but you should instead see a count of 2 when browsing the site in the default english language.

Does anyone know how to solve this or a workaround?

1 Answer 1


Look at advanced_forum_statistics_topics (check your advanced_forum version)

return db_result(db_query('SELECT COUNT(DISTINCT(nid)) FROM {forum}'));

You can use preprocess forum_statistics and instead of advanced_forum_statistics_topics(); use your own function to select only nids which relate to the current language.

  • Can you give me an example function please?
    – ipwa
    Commented May 22, 2014 at 5:58
  • what is your advanced forum version? Commented May 22, 2014 at 6:13
  • I'll give you the bounty because its about to end but please remember to give me an example, thanks.
    – ipwa
    Commented May 26, 2014 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.