Closed (outdated)
Project:
Views (for Drupal 7)
Version:
6.x-3.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2012 at 16:25 UTC
Updated:
14 Mar 2019 at 19:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehnerThe problem is this row:
As you see if total_rows will not be set, it simply doesn't display something. For some pager plugins though there is no count query runned, and so total_rows is not set. Here is a patch
Comment #2
k4v commentedthis patch works fine for me
Comment #3
dawehnerThanks for the bug report and testing the patch! Committed to 7.x-3.x
Maybe this could be backported to 6.x-3.x
Comment #4
dan.mantyla commentedWorks for me too! However I was hoping that
$totalwould be the actual total in the database, not what was queried, i.e. if "Use pager: Display a specified number of items | 5 items" then$totalwill just be 5 items...This may be nit-picking, but
$total = isset($this->view->total_rows) ? $this->view->total_rows : count($this->view->result);can just be
$total = isset($this->view->total_rows) ? $this->view->total_rows : $count;(
$countwas defined on line 63 but I don't see it being used anywhere else)Comment #5
jstollerHere's a patch for the 6.x-2.x branch, incase anyone else needs it.
Comment #6
izmeez commentedPatch in comment #5 applies without difficulty to latest views-6.x-2.26 and is a simple patch that was committed to views-7.x-3.x.
I have reviewed it and am marking it RTBC for 6.x-2.x
Comment #7
chris matthews commentedThe Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue