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.
| Comment | File | Size | Author |
|---|---|---|---|
| views_service.11122008.patch | 593 bytes | ebeyrent |
Comments
Comment #1
marcingy commentedduplicate
Comment #2
karlis commentedduplicate 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.
Comment #3
giorgio79 commented+1
Comment #4
giorgio79 commentedActually, given the patch this is ready for testing
Comment #5
marcingy commentedThis was a duplicate and is fixed in 5-x-1-dev.
Comment #6
giorgio79 commentedI am having this issue in 6.x
Comment #7
marcingy commentedSee http://drupal.org/node/654644 and join the discussion there.