I'm using Flex to get content from Drupal using the views.getView method, and even though the view has node limits set, the view returns all nodes. The reason is that the views_service_get_view() function doesn't set a limit:

$result = views_build_view('result', $view, $args);

This really needs to be fixed to respect the limit:

$result = views_build_view('result', $view, $args, false, $view->nodes_per_page);

I've attached a patch that makes this change.

CommentFileSizeAuthor
views_service.11122008.patch593 bytesebeyrent

Comments

marcingy’s picture

Status: Active » Closed (fixed)

duplicate

karlis’s picture

duplicate of what? I can't find any other pages with this issue. But if you look at the views_build_view API, you have to explicitly mention the node limit, either view->nodes_per_block or another number.

giorgio79’s picture

Status: Closed (fixed) » Active

+1

giorgio79’s picture

Status: Active » Needs review

Actually, given the patch this is ready for testing

marcingy’s picture

Status: Needs review » Closed (fixed)

This was a duplicate and is fixed in 5-x-1-dev.

giorgio79’s picture

Version: 5.x-0.92 » 6.x-2.x-dev
Status: Closed (fixed) » Active

I am having this issue in 6.x

marcingy’s picture

Status: Active » Closed (fixed)

See http://drupal.org/node/654644 and join the discussion there.