I have this Drupal 7 site (updated from my D6 site). I have nodetypes wich allows comments. I have the pager for comments at the very end of the comment lists that shows (as you can imagine) the complete pager: << 1 2 3 4 ... >>

The thing is that the max comments allowed per page is 50, and even in nodes that have 1 or 2 comments the complete pager appears!

How can I prevent that from happening?



After researching for quite some time, I´ve found this reply in the Omega issue queue that gave me the answer. Even when the answer has nothing to do with the theme layer.

In short: When this happens to you, it´s probably because the pager is conflicting with a views block with it´s own pager activated, all in the same page.

You actually fix this by giving the Views pager a different value than the default zero.

Posted it here just in case anyone encounters with this issue again!



  • Thanx, Rosamunda, your answer help me a lot! – Eugene Fidelin Aug 29 '12 at 11:23

This is not standard Drupal 7 behaviour. To me it sounds like it is some code in your theme that is causing this or perhaps a module. Try changing theme to see if the pager disappears. If the pager disappears look inside template.php for a implementation of theme_pager().

  • Many thanks for your reply!! I´ve tried that (change the theme to Bartik) and the bug is still there. What can I do? – Rosamunda Aug 17 '12 at 14:02
  • But! It doesn´t happen in Garland. What´s weird is that if it´s a theme thing, why it won´t solve in Bartik? Anyway, I´ve looked inside Omega theme (I´m using an Omega subtheme), and din´t find any theme_pager() implementation... – Rosamunda Aug 17 '12 at 14:37

I just ran into this same problem on my content pages. After reading this I remembered that I had created a new block view for recent comments. Going to that view and changing the Pager ID field in the pager settings to something higher than the default of 0 (I entered 100) - fixed the issue. I wasn't even using that recent comments view on the page.

There is this note in the pager settings for the view:

Unless you're experiencing problems with pagers related to this view, you should leave this at 0. If using multiple pagers on one page you may need to set this number to a higher value so as not to conflict within the ?page= array. Large values will add a lot of commas to your URLs, so avoid if possible.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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