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

morbiD’s picture

This won't be fixed in views. See http://drupal.org/node/647694#comment-2338198

merlinofchaos suggests that $fields = $this->rendered_fields should now be used instead of trying to render the field again in views_cycle unnecessarily.

Mac Clemmens’s picture

How would I do that? In views using customfield?

FiNeX’s picture

subscribing

Crell’s picture

Version: 6.x-1.0-beta1 » 6.x-1.x-dev

views_cycle has been updated to use ->rendered_fields in the latest dev, so that should take care of this as well.

Crell’s picture

views_cycle has been updated to use ->rendered_fields in the latest dev, so that should take care of this as well.

Crell’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.