views:

1181

answers:

5

Hi,

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?

A: 

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.

greggles
Hmm. Doesn't work in Garland either, so NOT a theme problem after all.
anotherthink
A: 

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!

Jeremy Heslop
+1  A: 

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

anotherthink
A: 

I have the same problem. Pager is not showing for custom content types. I tried almost everything above while debugging. What version of Mysql server should I switch to ? I am currently on 5.1.37

Thanks.

carlitto
+1  A: 

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.

Alienatix
Not an answer to this particular problem -- the question specifies that your solution didn't solve it. As I specify below, in this case, the issue was an outdated version of MySQL.
anotherthink
I love Drupal but I really hope D7 handles the pager better... it's a case study in why global variables are the evil.
CurtainDog