Hi everyone,

I am very new to Drupal and this forum. I would first like to thank everyone for their hard work, dedication, and patience to honestly answer our questions. Thank you all for your time because it is much appreciated.

I wanted to see if there was update or release for the fix of incorrect post numbers on the Drupal forum module. I know this was already posted: http://drupal.org/node/113611 and issued as closed. Since I could not apply the patch for my Drupal 7 site, is there an update to this patch so it could work with Drupal 7? Thank you all for your help!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

catch’s picture

Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

That patch was committed to Drupal 6 and has no relation to the Drupal 7 forum module.

If you are seeing incorrect numbers of posts in a Drupal 7 forum, please post the following:

- was it upgraded to from Drupal 6?
- which contributed modules do you have installed?
- how much discrepancy is there in the post count?
- have you disabled then re-enabled forum module?

If the answer to the last one is 'yes', then this is likely a duplicate of #597736: Do forum indexing on cron.

504golgo13’s picture

Version: 7.x-dev » 7.4

Thank you so much for the fast reply!

I've been struggling with this issue and I can't seem to wrap my brain around it. It seems that the issue only occurs when I add another role to a user. It actually doubles the number of topics and posts in the forum container. E.g. displayed in forum container: 1 topics and 2 posts for admin, 2 topics 4 posts for users with an added role. It doubles each time a user is given another role. This error also causes the Archive block to display the incorrect number of archived forum topics.

I will now post the following information to answer your questions:

Was it upgraded to from Drupal 6?
No, this is a fresh install of Drupal 7.4

Which contributed modules do you have installed?
Here is the list of installed contributed modules:

  • ACL
  • Content Access
  • Forum Access
  • Bulk Export
  • Chaos tools
  • Date
  • Date API
  • Date Popup
  • Date Repeat API
  • Date Tools
  • Date Views
  • Imagepicker
  • Advanced Forum
  • Agenda
  • Author Pane
  • Chain Menu Access API
  • Colorbox
  • Colors
  • Image resize filter
  • CAPTCHA
  • Image CAPTCHA
  • Wysiwyg
  • FullCalendar
  • FullCalendar Colors
  • Views
  • Views UI

How much discrepancy is there in the post count?
Every forum post and topic is doubled. E.g. 1 topics and 2 posts for admin, 2 topics 4 posts for users with an added role. The Archive block also displays the incorrect number of archives due to this error.

Have you disabled then re-enabled forum module?
No, I have not disabled and re-enabled forum module.

I hope my information is clear and understandable. Thank you and everyone else that contributes to this post. This is a major pain in the rear especially since I'm ready to deploy the website.

Lula’s picture

This problem still appears in 7.8. Any update available on this?

Seems like it is definitely the same issue that has been around for a while and fixed in 6 (as 504golgo13 pointed out), where using any access module causes the counts to mutiply by the number of user roles a user has (apart from if when the user has a core admin role)? Is this the same thing or am I way off the mark?

danweasel’s picture

I ran into this as well, running:

Advanced Forum
Forum Access
ACL
Taxonomy Access Control

except that topic/post counts were being multiplied by 5. Disabling Forum Access removed the issue, which is mostly okay since I'm using TAC to do the heavy lifting of access control. The only reason I had Forum Access there was to remove disabled entries from the forum taxonomy when moving a topic.

In any case, I'm not sure it's a pure access control issue, it may be specific to Forum Access.

benjohnstone’s picture

Version: 7.4 » 7.9

I'm running the forum (D7.9) with no access control modules installed and the forum is reporting incorrect topic and post numbers - I really need this work, I would assume it would work out of the box

flightrisk’s picture

I have been having this issue for almost a year now in D7. Is anyone looking at the problem?

AnisB’s picture

Hi experts,

I'm running on D7.12 and I have this problem,
It will be very helpfull if this issue is solved, for such great and simple core module.

Thank you for all efforts.

AnisB’s picture

Oh,

when creating a new topic, even if I'm using admin account and put the topic published, I should re-edit the topic to make it published.
That why topic number is not updated.
So it's working for me.

star-szr’s picture

Edit: It's also very possible this won't fix your error, just thought I'd share. See salvis' comment:
http://drupal.org/node/1237380#comment-5297152

It's also possible that this is fixed in Drupal core now (7.13), see #681760: Try to improve performance and eliminate duplicates caused by node_access table joins

--

I'm using Content Access and Forum Access, Drupal 7.12.

I was able to get the right count of topics and posts with these steps:

1. Visit admin/structure/types/manage/forum/access (Structure » Content types » Forum topic » Access control)
2. Under Advanced, set Give content node grants priority to -1.

From my understanding this lets Content Access get out of the way and let Forum Access handle everything.

I've attached a couple screenshots, before and after changing this setting.

star-szr’s picture

Oops, missed the second screenshot. Here's what editing the forum topic looks like after changing the setting.

Taxoman’s picture

Version: 7.9 » 7.x-dev
Priority: Normal » Major
Status: Postponed (maintainer needs more info) » Active

Adjusting version and priority.
Would be great with feedback to #9.

salvis’s picture

@Taxoman: What kind of feedback would you like to get?

The screenshot with the empty fieldset shows a bug in Forum Access that I will investigate.

Other than that, Cottser is correct to say that this will get CA out of the way for nodes of the forum topic type, but as the screenshots explain, the conflict may remain for nodes of other types that are enabled for forums.

BTW, if anyone needs to investigate how multiple node access modules cooperate (or conflict), you should install Devel Node Access and enable its debug mode and second block.

marcingy’s picture

Priority: Major » Normal

This is not major.

israel07’s picture

I just want to ask regarding the "new post" icon on Advance Forum module. I tried to post something on a forum but the picture of that thread is not update "new post" with a star icon.And one more thing how to configure forum that when other user post some reply there post will be on the top of the list on the last post? I really need your feed back thanks!

mgifford’s picture

Issue summary: View changes

#113611: Forum count incorrect when using access control modules is listed as fixed now. Is this issue still open?

Generally development happens on D8 and then gets backported. Not sure anyone would be looking at this.

salvis’s picture

Title: Any Updates on Incorrect Number of Posts Patch for Drupal 7? » Any Updates on Incorrect Number of Posts Patch for Drupal 7 (in the presence of node access modules)?

@mgifford:
The other thread is about D6. As I wrote in #113611-110: Forum count incorrect when using access control modules the code is completely different in D6 and D7, and the two threads only share similar symptoms.

AFAIK, this issue is still open for D7, don't know about D8.

ExTexan’s picture

Is there a fix for this yet? I just noticed it today on my D7.41 site(s).

salvis’s picture

It has taken over 4 years to get it fixed for D6. This thread (for D7) is in its 5th year, too, but no one has even had the courage to post a patch yet...

The first step to get this fixed for D7 is to check whether the issue is still in D8, but it takes multiple node access modules to trigger it, and AFAIK we don't have those yet.

Isyldar’s picture

Not sure if this is related or not, but I recently noticed a fix implemented in AF of a similar nature: https://www.drupal.org/node/1739982