I'm calling this a support request because I expect that if it were a bug, someone with more experience would have already reported it.

Using the latest updated versions via CVS of everything, I have two custom pagers for two different cck types. In each case when there are more than 10 items to be paged, the pagers always show x of 10 regardless of the actual number of items being greater than 10. (The pager is missing from all nodes beyond 10.)

One CCK custom pager is set up by node type, and uses a view (with 0 or unlimited items to display in the view) that takes a view argument using the token [field_trip_name-nid] - a relationship in the view. (Although in the Views argument it is expressed as a default argument using PHP argument code)

In the second CCK custom pager example, it is also set up by node type, and uses a view (with 0 or unlimited items to display in the view) that takes a view argument using the token [term-id] - (Although in the Views argument it is expressed as a default argument using PHP arguement code)

Have I committed some major blunder? I looked for some possible default setting of 10 but found nothing, so I'm stumped. I've previously themed the functionality under Drupal5, but I was hoping to use the "official module" if possible.

Thanks if you can help!!

CommentFileSizeAuthor
#22 custom_pager_views3_support.patch550 bytesayalon

Comments

psynaptic’s picture

I'm having the exact same problem. On node 10 of my view results it doesn't have a next link. Looking into it now. Can't seem to see anything in the module that would cause this.

psynaptic’s picture

It seems that $view->pager['items_per_page'] is 10 no matter what my views settings.

psynaptic’s picture

Ok, it looked like we needed to be able to select which display to use. I created a patch that applied to the beta rather than the dev. I added the ability to select which display to use and save it to the db. Then use $view->preview to get the right data. Was working great until I looked at dev and someone (eaton?) has already gone around the issue another way.

I'll try and see if I can add my patch to the new dev version and see if you like it.

Related posts:

#279925: views and custom_pagers works strange (view->execute)

herb’s picture

Thank You! - I thought I was doing something wrong since no one else had reported it. I'll check out the latest Dev and see if that resolves the issue and/or wait till a patch is available. Should this be changed to a "bug report"?

amethyst’s picture

I encountered the same and found the limiting number in modules/views/includes/view.inc (v 1.151) line 34-40 var $pager...
There 'items_per_page' is set to 10. After patching there to 100 or 0 (assumed to be infinite) it worked fine. But I'm totally new to Drupal and PHP and this is hacking, I admit. So is it a bug in views module?

psynaptic’s picture

It's not a bug in Views, they are just required defaults.

Did you try the latest dev of custom_pagers?

herb’s picture

I just tried the latest dev and it seems to work now! Many thanks to the maintainer.

j0nathan’s picture

subscribing

doublejosh’s picture

Doing so also.

mcsolas’s picture

Subscribing.. Same issues for me. In my case, I have managed to get this working.. I used to see from 1 to say.. my 1000th node.

Today, it reverted back to showing max 10 !!

Not sure why.. I havent touched the settings.

All we have been doing is posting... now I guess.. its time to go back in and take a look.

geerlingguy’s picture

I am having the same problem... will try latest -dev release to see if it helps.

Node in question: http://www.lifeisaprayer.com/photos/2009/1261

[Edit: Updating to the latest -dev release did work. Thanks!]

henrrrik’s picture

It would be nice to have the latest 6.x-1.x-dev rolled out as a 1.10beta2.

zzadik’s picture

I had the same problem, and managed to solve it by hacking the beta1 version.

Until the beta2 version is out, you can try using the following fix:

In custom_pager.module, locate the "custom_pager_build_nav" function and look for:

<?php
// Make sure the query is not cached
      $view->is_cacheable = FALSE;
      $view->execute();
?>

Now modify it to include the following 2 calls (init_display & pre_execute):

<?php
// Make sure the query is not cached
      $view->is_cacheable = FALSE;
      $view->init_display();  
      $view->pre_execute(); 
      $view->execute();
?>

Hope it helps until the dev version becomes beta2

tanot’s picture

Thanks a lot zzadik, your solution indeed work :)

danny_joris’s picture

#13 , zzadik's solution works for me as well. Hopefully beta2 will be out soon.

Thanks!

davepoon’s picture

Thanks zzadik.
Looking forward to the final release.

djmy’s picture

had the same issue and just installed the dev version it works now!

eaton’s picture

Status: Active » Fixed

Included in the latest dev version, will be rolled into the release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

fictionindustries’s picture

Version: 6.x-1.10-beta1 » 6.x-1.0-beta2

I use 6.x-1.0-beta2 and Views 6.x-3.x-dev.

This was not an issue before but after an update it didn't work anymore. Only showing x of 10 while the list should have more than 10 nodes.
Is this because I use Views 3 now?

ayalon’s picture

I have the same problem.

ayalon’s picture

StatusFileSize
new550 bytes

Here is a patch that add support for Views 3

nchase’s picture

thank you for the patch. Applying it against latest dev I got an

Hunk #1 FAILED at 269.
1 out of 1 hunk FAILED