Closed (fixed)
Project:
Nodequeue
Version:
7.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2011 at 17:33 UTC
Updated:
22 May 2011 at 19:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
setvik commentedTracked this down to how PagerDefault::limit and PagerDefault::execute work in DBTNG.
Limit's documentation implies setting $limit to 0 should just disable the pager and return all results; Execute's docs suggest the intended behavior is to kill the query and return no results.
Posted a doc issue here: http://drupal.org/node/1136576
In the meantime, the attached patch solves 2 problems:
1) it caches the query results based on $page_size
2) if $page_size is 0, it removes the PagerDefault call and returns all results as expected
Comment #2
amateescu commentedI encountered this bug while working on #817558: Machine names in the nodequeue relationship handler, so we should really clean up this function.
@setvik, thanks a lot for investigating this. Attached patch follows your conclusion and solved problems from #1 and also updates it to make better use of the wonderful D7 database api.
Comment #3
amateescu commentedNew patch that also uses the $pager_element parameter and fixes some calls to
nodequeue_get_all_qids()from nodequeue.actions.inc.Commited attached patches to 6.x and 7.x.
http://drupalcode.org/project/nodequeue.git/commit/00e7ff9
http://drupalcode.org/project/nodequeue.git/commit/b1245aa