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.
Conditions for bug replication
- Checked Get the number of new comments per forum on the forum list from admin/config/content/advanced-forum ( If checked, Advanced Forum will get the number of new comments as well and show it under "posts" on the forum overview. Slow query not recommended on large forums.)
- Create new revision enabled ( site level from admin/structure/types/manage/forum or by each post)
Comment | File | Size | Author |
---|---|---|---|
#12 | wrong_number_of_posts-1946386-12.patch | 684 bytes | dysrama |
#2 | af7_1946386_1.patch | 609 bytes | troky |
#1 | af7_1946386.patch | 1.27 KB | Drupa1ish |
Comments
Comment #1
Drupa1ish CreditAttribution: Drupa1ish commentedComment #2
troky CreditAttribution: troky commentedTry this simple patch.
Comment #3
Drupa1ish CreditAttribution: Drupa1ish commented#2 works. Nice!
Comment #4
daften CreditAttribution: daften commentedJust reporting I also have this problem. Will try patch from #2
Comment #5
daften CreditAttribution: daften commentedI also have the wrong number for number of topics and replies in the forum listings and for the statistics with number of replies at the bottom of the forum listing.
Changing current lines 145 through 147 from
back to the 7.x-2.0 code:
Fixed the counts in the forum lists
Looking for the other issue now
Comment #6
troky CreditAttribution: troky commented@daften:
Can you show me example of wrong topic count?
Above patch (#5) was applied as per #145353: Forums performance improvements
Comment #7
Drupa1ish CreditAttribution: Drupa1ish commented@daften. This issue is only for new posts and topics.
#2 fixed this. So i suggest to close it.
We have opened a new issue for general wrong topics count #1948652: Wrong topics and posts count
Comment #8
daften CreditAttribution: daften commentedYes, but the problem there is a different problem due to forum hierarchy
As far as comment #7 is concerned, yes, for the forum module. This code is in the advanced_forum module in the function that was copied from forum.module...
The main problem is the double entries in the forum_index table, I don't understand at all why they would be necessary. They are exact duplicates ... I've asked for more info on issue #1466458: Duplicate entries in in forum_index table
Comment #9
troky CreditAttribution: troky commented@daften:
does changing line (from #5):
to:
solve the problem? (using forum_index table, of course).
Comment #11
troky CreditAttribution: troky commentedClosing this.
Comment #12
dysrama CreditAttribution: dysrama commented@troky. putting the distinct on the count for forum_index fixes the wrong topic count yes.
For people who just need this to work right now, I made a patch that applies to the 7.x-2.1 version of advanced forum, since the core issue doesn't seem to be advancing at all.