Fragmented Thought

Drupal Views Node View May Kill Your Pager



Lance Gliser

Heads up! This content is more than six months old. Take some time to verify everything still works as expected.

I installed the blog module today for a client. Loaded 200+ blog entries, and went to /blog to see the result. I was greeted by the most recent blog entry, and nothing else. I spent a good hour chasing down why more than one blog entry would not show, and the result turned out to be a Views / Drupal interaction bug.

Turns out this was a site that had view, and webform. But, before webform offered 'available as a block' itself. So, a view had been made that rendered a full node, as a block. And that happily served throughout the site to output. I expect that views manages to keep its paging going nicely within itself. For some reason, the Drupal core pager just got overrun in the file. Prior to line 267 function update_page_info(), I had 200+ elements in my pager. After, just the 1 caused by the node view.

The solution, was of course to delete the node view. I may still try to figure out why it broke, and post an issue for them to review.