First off: thanks for fixing #738074: Forum count incorrect when using access control modules!

Then, my problem is the comment number in the topic view looks like it's wrong. It was working on 6.x-1.1 just fine I believe, but after 6.x-1.2 it seems to reset the comment number when the discussion goes over multiple pages.

So let's say: Forum post -> first comment -> [...] -> comment 9 -> new page -> comment gets number 1 and counts again from there.

I don't really know how to say it any clearly, or if there is a bug on my behalf, but it's a bit annoying.
If I really sound confusing: the number in the span with the class "post-num" get's reset on each new page the forum topic's discussion goes.

Hopefully it's not something all too severe.


Members fund testing for the Drupal project. Drupal Association Learn more


Michelle’s picture

Title: Comment post number is wrong (topic view) » Comment post number is wrong after first page

Hmm... Strange. I have no idea what I might have changed to cause that. I did confirm the problem but that's as far as it's going to get in the near future, sorry. Just too much else going on to deal with 1.x right now. If someone comes up with a patch in the mean time, I'd be happy to commit it.


janis_lv’s picture

subscribing :)

is this related to the 6.2 alfa 4 version?

in comment right top corner numbering gos #1,2,3,4,5 just increasing but the number in reply displays the correct commenting order. (Reply to #3)

- node - #1
- - comment - #2
- - comment - #3
- - comment - #4
- - comment - #5
- - - comment (reply to #5) - #6
- - - - comment (reply to #6)- #7
- - - - - comment (reply to #8)- #8
- - comment - #9

I can provide a link or add screenshot if needed. :)

Michelle’s picture

I can repro this in 1.x but not in 2.x so, yeah, a link would be good.


janis_lv’s picture

an example is here:

post numbered #9 (posted 12 o' clock) was submitted prior to post numbered #8 (posted 18 o' clock),

I've seen more then one example of this, I have nested comments.

I've added one more "test" comment and the numbering changed :)

Michelle’s picture

@janis_lv: Oh, that's completely different. AF doesn't 100% support threaded forums. It mostly works but there are some oddities and that's one of them. AF applies the numbers in the order the comments are rendered, not the order they were created. I don't know if that's solvable or not. If someone wants to tackle it, please start a new issue.

This issue is for a clear bug in 1.x where the comment renumbering is being restarted on every page in a multi page topic. It wasn't like that before and I haven't had time to dig in and see what happened. If someone wants to have a look, I suggest checking recent commits to see if I did anything in that area.


MerjaS’s picture

sorry, wrong thread


Michelle’s picture

No, actually, spam control has nothing to do with AF restarting the post numbering on multipage threads. Spam control is out of scope for AF but there are many modules for combating it that you will find in the download section.


sb56637’s picture

Hi, this behavior showed up when I upgraded from 6.x-1.1 to 6.x-1.2. A user just reported the bug at a site I run, . On long threads that go to the second page, the comment # in the top right of each post restarts at 1. You can see this for example at node/1419 , setting the number of posts per page to 100 you will see what comment #51 really is. But if you set the posts per page to 50 and then goto node/1419?page=1 you will see that #51 is labeled as #1 again.

Thanks very much for looking into this, and thanks for advanced_forum!

sb56637’s picture

Ok, I am getting a lot of complaints from users about this issue. Should I revert back to 6.x-1.2 or should I upgrade to 2.x?
Thanks for the help!

Michelle’s picture

Up to you. 1.2 isn't a security release so you can safely go back to 1.1 if you want. Make sure to downgrade Author Pane as well. There's no data to worry about losing but there may have been changes to settings so double check all those and clear your cache.

I don't know when I'll be able to work on this, unfortunately. Too many things vying for my attention. I really wish someone would step up to be a co-maintainer for the 1.x branch. I don't use it anymore and finding time to support it is difficult.


sb56637’s picture

OK, thanks very much for the helpful reply Michelle. And thanks for advanced_forum.

mcdruid’s picture

Assigned: Unassigned » mcdruid
Status: Active » Needs review
604 bytes

Here's a patch to fix this issue in 6.x-1.2 and current 6.x-1.x-dev

I'm checking this doesn't break anything else (doesn't look like it should) - if anyone wants to test that it fixes their issue, that would be great.

StudioARE’s picture

Going to test soon, I searched for the code on drupalcode and found similar looking code there.

From line 529:

$post_per_page = _comment_get_display_setting('comments_per_page', $variables['node']);
     $page_number = $_GET['page'];
     if (!$page_number) {
       $page_number = 0;

Can't find any issues related changing the code from either patch nor drupalcode. This looks good! :)

mcdruid’s picture

Status: Needs review » Closed (fixed)

Thanks StudioARE - your code snippet is from 6.x-1.1 - this bug was introduced in 6.x-1.2

The fix has been committed to the 6.x-1.x branch, and should be in the next 1.x release.

Michelle’s picture

Thanks, mcdruid! I wonder why I changed that bit of code? I don't usually mess with stuff much in 1.x since it's the stable branch. Weird. Anyway, thanks for getting it fixed. That was a pretty annoying bug.


mcdruid’s picture

Status: Closed (fixed) » Fixed

oops - realised I should have been setting issues to "fixed" rather than "closed (fixed)"

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.