4
votes

I have a Drupal 6 site where I've created a view that shows a list of nodes. Nothing complicated -- except that when I choose "use pager" --> "yes" (and choose the "full pager" option), the pager doesn't show up on the page. The first page of nodes shows up, but there's no way to get to other pages.

Through googling, I saw that some people had an issue with the "Pager Element" item, so I changed that from 0 to 1 -- no luck.

This shouldn't be very complicated, but I've been at it for a while!

Help!?

ETA: I've tracked it down to the following lines in /modules/views/theme/theme.inc:

$pager_theme = views_theme_functions($pager_type, $view, $view->display_handler->display);
$vars['pager']  =  theme($pager_theme, $exposed_input, $view->pager['items_per_page'], $view->pager['element']);

The first line returns an array; the second line returns nothing.

I suspect now that this is a theming problem with the custom theme I'm using that may not have fully been correctly updated for Drupal 6 -- like, maybe I'm missing a pager template somehow? -- however, I'm quite new to Drupal and don't really understand how to further track down and fix the issue. Any advice would be much appreciated!

ETA yet again:

The pager also doesn't show up when using Garland, so it's not a theme issue after all. ALSO: I have a copy of this site set up on a development server as well, and that copy has working pagination! I've checked what I thought might be different -- files in the theme, what modules are enabled -- and it seems like pretty much everything is the same. The one thing that I know is different, however, is that the production server has a lower version of MySQL (lower than recommended for Drupal 6 -- we're waiting on the hosting company being able to change this later). Would it make sense that the old version of MySQL is unable to do pagination correctly in Drupal 6? If so, does anyone know a workaround I can do until we are able to update MySQL?

4
Is it showing up when you preview the view, or is it missing from the preview as well?Mike Crittenden
It's missing from the preview as well.anotherthink
Stupid question: are you absolutely sure that you have enough nodes that a pager is needed? Try setting the node limit to a lower number and see if it shows up then.Mike Crittenden
Good question :). But yes -- setting the # to 10 instead of 25 displays 10 nodes and no pager, and setting it to 0/unlimited results in an out-of-memory error. If it's related: I'm also not seeing pagers on other parts of my site where I'd expect them to be (e.g. search results), so maybe all of pagination is broken somehow? If that's the case, any ideas how to fix it? This is a site that someone else set up that I've just upgraded to Drupal 6, for what that's worth.anotherthink
I'd try all the usual debugging such as running update.php, running cron, flushing all Drupal caches, disabling any modules you can (often this stuff is caused by buggy modules), etc. Other than that, fraid I can't help.Mike Crittenden

4 Answers

5
votes

I had this problem and fixed it this way:

edit your view: click on "Use pager" and set "Pager element:" from 0 to 1. Save the view.

3
votes

It was MySQL all along! Moved to a new server with the right version of MySQL, and everything is peachy keen again.

2
votes

It seems like you've done a lot of troubleshooting on your own. Try using a default theme like Garland and see if that fixes it. If so you know it's a theme problem.

1
votes

Couple of things you can try:

  • Clone the view and see if the pager shows up there.
  • Change the view from a node list to a field list and back (or the reverse)
  • See if you have comments in shown in the view. Turn off comments to see if that is causing an issue as comments have their own pager. (If you need comments you might have to change your pager # to a higher number than nodes, ie # of nodes +1)
  • Turn on/off ajax pager option
  • Check your .htaccess on the production server. Tweak the RewriteBase
  • Try dropping your database and restore it again. Upgrading from 4 to 5 might not have properly setup the collations on the tables.

That's all I can think of at the moment to try without more info. Having an export of your view might help.

Also have you tried making a duplicate of the site on teh production server under another domainname or subdomain? Might flush out some issues that way. Good Luck!