Closed (fixed)
Project:
Views cycle
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Nov 2009 at 16:40 UTC
Updated:
27 Jan 2010 at 19:50 UTC
Note: this worked previously but it seems to have broken in the latest version of Views 6.x-2.7
If I may be so bold. I believe it has to do with how views is now rendering the output of the counter.
From views/handlers/views_handler_field_counter.inc:
<?php
function render($values) {
// Note: 1 is subtracted from the counter start value below because the
// counter value is incremented by 1 at the end of this function.
$count = is_numeric($this->options['counter_start']) ? $this->options['counter_start'] - 1 : 0;
$pager = $this->view->pager;
// Get the base count of the pager.
if ($pager['use_pager']) {
$count += ($pager['items_per_page'] * $pager['current_page']) + $pager['offset'];
}
// Add the counter for the current site.
$count += $this->view->row_index + 1;
return $count;
}
?>
Comments
Comment #1
morbiD commentedThis won't be fixed in views. See http://drupal.org/node/647694#comment-2338198
merlinofchaos suggests that
$fields = $this->rendered_fieldsshould now be used instead of trying to render the field again in views_cycle unnecessarily.Comment #2
Mac Clemmens commentedHow would I do that? In views using customfield?
Comment #3
finex commentedsubscribing
Comment #4
Crell commentedviews_cycle has been updated to use ->rendered_fields in the latest dev, so that should take care of this as well.
Comment #5
Crell commentedviews_cycle has been updated to use ->rendered_fields in the latest dev, so that should take care of this as well.
Comment #6
Crell commented