From DRUPAL-5 of views_pager_query.module

  // NOTE: if the sort field isn't alpha, the results don't make sense
  // NOTE: should we remove this check and just always look for fields first
  if ($view->page_type == 'table' || $view->page_type == 'search') {
    foreach ($view->field as $field) {
      if (isset($field['sortable'])) {
        $sort_field = $field['fullname'];
        break;
      }
    }
  }

isset($field['sortable']) returns true when sortable = '0'.
In many cases this is ok because something like 'title' is the first cab off the rank.
In my case a different field was first.

!empty($field['sortable']) works for me.

Bloody handy module, thanks for all the hard work.

Comments

douggreen’s picture

Status: Active » Fixed

Thanks! I applied the patch.

Anonymous’s picture

Status: Fixed » Closed (fixed)