When I make my custom handler click sortable and subsequently click the label in the table heading of the view I get the following error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'unknown' in 'order clause'
My handler is defined as below. This is a render only handler that performs a calculation on some other field data and outputs.
UPDATE:
Am I right in thinking that because this data is not stored in the database that I can't make it click sortable because there is no column to order by in the SQL statement that is generated?
Is there a way around this? Any help appreciated.
function rate_calc_views_data() {
$data = array();
$data['node']['rate_calc_handler_result'] = array(
'title' => t('Standard Deviation'),
'help' => t('Calculates the voting result standard devaition'),
'field' => array(
'handler' => 'rate_calc_handler_result',
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
),
'filter' => array(
'handler' => 'views_handler_filter',
),
); return $data; }