To whomever wrote this line:

views.inc line 653
if (!empty($this->pager['items_per_page'])) {

You'll want to exempt the view from "items_per_page" if "use_pager" is false, seems selfevident, so...

views.in line 653
if ((!empty($this->pager['items_per_page'])) && ($this->pager['use_pager'])) {

Lots of code going all over the place with this module, but I'm assuming this is correct, as I specified "Use Pager" = no, and I only ever got 10 results.

Thanks for all your work on this!

Comments

merlinofchaos’s picture

Status: Active » Closed (won't fix)

I think you are incorrectly interpreting what that code will do. If items_per_page is set, use_pager is simply one of two ways to do it. It is *very* common to only want to return a set number of results, even with the pager off. If you want to return all results, you enter 0 in the items per page, which is exactly what it tells you to do when you select the items to display option in the UI:

The number of items to display per page. Enter 0 for no limit.

dergachev’s picture

Status: Closed (won't fix) » Active

I came across this very problem with custom_pagers this morning, and fixed it in the same way as epikur79, by manually setting the view property before the calling execute();

$view->pager['items_per_page'] = 0

However, I realize that I have the exact problem in my own custom module which calls views_build_view() and then $view->execute(), and I had to apply the same hack there.

Either there's a bug in views in handling items_per_page when the pager is turned off ON ALL DISPLAYS, or both I and the author of custom_pagers don't understand how to properly instantiate and execute a view from code. If not $view->execute(), then what?

@merlinofchaos, it'd be great if you could provide clarification as to what's going on. Obviously a lot of people have run into the same problem. This post is effectively a dup of the following:
http://drupal.org/node/279925
http://drupal.org/node/276984

merlinofchaos’s picture

Status: Active » Closed (won't fix)

Okay.

1) stop crossposting.
2) I clarified this: http://drupal.org/node/279925#comment-912816
3) That answer on that issue still stands.
4) This issue is UNRELATED and your weaselly attempt to get more attention just adds more traffic to a queue that I can barely maintain on my own, and now your name is on my mental list of people to skip.

dergachev’s picture

Earl, I'm sorry if perhaps I broke a rule about issue queue etiquette. I'm just beginning to actively use the issue queues, and realize I have much to learn.
As I do so, I see that you devote a superhuman effort to reading and answering all the issues, so my "cross posting" might be an unpleasant distraction. Sorry about that--I just thought that anyone who (like me) comes across the other issue through a google search might be interested in this issue too.

Usually, and in this case in particular, my posts are simply meant to help others who come across this issue looking for an explanation/workaround. By the time I posted, the problem was solved for me.

I don't know enough about views internals to understand the answer you gave in the other issue. Sorry for ignoring it, I should have tried to figure out what it meant.

I really appreciate the importance of your work on Views to Drupal, and eventually hope to contribute myself when my Drupal experience is at a sufficient level.

Hope to meet you personally at the next Drupalcon!