Hi, can anyone help me with this? I'm implementing hook_views_data_alter() with code copied from node, though it's producing queries with errors and failing:

  $data['taxonomy_term_data']['tid_representative_thread'] = array(
    'relationship' => array(
      'title' => t('Representative thread'),
      'label'  => t('Representative thread'),
      'help' => t('Obtains a single representative thread for each term, according to a chosen sort criterion.'),
      'handler' => 'views_handler_relationship_groupwise_max',
      'relationship field' => 'tid',
      'outer field' => 'taxonomy_term_data.tid',
      'argument table' => 'taxonomy_term_data',
      'argument field' =>  'tid',
      'base'   => 'thread',
      'field'  => 'thread_id',
    ),
  );

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM thread thread_ LIMIT 1 OFFSET 0) = thread_taxonomy' at line 1

Thanks!

Comments

heylookalive’s picture

Anyone?

MustangGB’s picture

Status: Active » Closed (outdated)