When on some node you have pagination pager and comments pager, pagers will not work as expected - both pager will react on user click. So if you click on some page in pagination pager you will change node pagination page but you will also change comments node page. Problem is that both pagers are using the same GET variable 'page' on the same page.

Easiest solution is to change pagination GET variable name to something else. In attached patch I have change pagination GET variable from 'page' to 'pagination' - maybe not the prettiest solution but its works for me.
So now for this special cases when you have both pager for some node your links will look like this

localhost/some-node?page=1&pagination=2

where 'page=1' means comments page 1, and 'pagination=2' means pagination node page 2.

This is maybe a rare situation for most of the sites so it's maybe also a good idea to add a switch in pagination settings for applying this change because this patch is changing pagination urls.

CommentFileSizeAuthor
#1 pagination_pager.patch2.02 KBpivica
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pivica’s picture

FileSize
2.02 KB

Forgot to attach patch.

mundanity’s picture

Status: Needs review » Needs work

Hello,

Thanks for the bug report. Probably the best way to deal with this is to use the drupal pager as it's intended for. Typically it takes a comma delimited value in the GET parameters (ie, page=1,2), depending on the order, corresponds to which page on which pager. If you want to take a stab at that I'd be eternally grateful, otherwise, I'll definitely try to get that in for next release.

rsevero’s picture

@mundanity

I'm also interested in this issue.

I've looked for more info on the comma delimited value in the GET parameters (ie, page=1,2), depending on the order, corresponds to which page on which pager feature you mention but could not find it. I've looked at the theme_pager code and it's reference manual page.

Can you please point where I can find more info on this feature?

john.kenney’s picture

+1

i am finding this problem, too. node content and comments page in tandem when you use either pager.

unfortunately, i think it means i can't use this module which is a shame because this module appears not to have a conflict with AdSense that i'm seeing with Paging module. plus the toc is very nice feature.

if someone can fix this (without introducing the AdSense problem), i might be prepared to offer up a modest bounty.

pivica’s picture

I have done little research on #2 and figure it out how drupal pager is working for multiple pagers on the same page. I will try to implement this and create a new patch - hopefully tomorrow I will have time for this.

john.kenney’s picture

excellent!

madjr’s picture

sub :)

also @john.kenney , what was the adsense problem you're talking about with paging mod, is there a bug report or url?

edit--
nvm, found it
#848500: Problem when using Paging module with AdSense module

madjr’s picture

well the paging module is using for its pager, the correct method of "the comma delimited value in GET parameters (ie, page=1,2)"

the code should give a quick example/idea.