Closed (fixed)
Project:
Project
Version:
x.y.z
Component:
Projects
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Jan 2006 at 01:18 UTC
Updated:
12 Feb 2006 at 19:31 UTC
Jump to comment: Most recent file
When we have paged results when browsing projects using the new interface, the pager links aren't appearing at the bottom of the page. The relevant lines from project.module:
We use a pager_query, if appropriate.
$pager = module_invoke($module, 'project_sort_methods', 'pager', $sort_method);
if ($pager) {
$first_field = array_shift($sql_elements['fields']['pieces']);
array_unshift($sql_elements['fields']['pieces'], "COUNT($first_field)");
$sql_count = project_build_query($sql_elements);
$result = pager_query($sql, variable_get('default_nodes_main', 10), 0, $sql_count, $parameters);
}
And at the bottom of the page:
if ($pager) {
$output .= theme('pager', NULL, variable_get('default_nodes_main', 10));
}
But the pager links aren't there.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | project-list-paging.patch | 1.32 KB | nedjo |
Comments
Comment #1
nedjoThis was an issue with the
$count_queryparameter of thepager_query()call, arising from the use of aGROUP BYclause. Fixed thanks to the good documentation infunction pager_query(). We now detect ifGROUP BYclause is present, and if so use its field for the counting.Attached is the patch I applied.
Comment #2
(not verified) commented