Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
heylookalive CreditAttribution: heylookalive commentedAnyone?
Comment #2
MustangGB CreditAttribution: MustangGB commented