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.
Relationships are not fully working, I'm using Views 3 (alpha) but in my opinion the problem is the same with Views 2.
In support_views.views.inc
// Assigned
$data['support_ticket']['assigned'] = array(
'title' => t('Assigned ID'),
'help' => t('The Assigned ID of the ticket.'),
'relationship' => array(
'base' => 'users',
'field' => 'uid',
'handler' => 'views_handler_relationship',
'label' => t('Assigned User'),
),
[...]
'field' => 'uid' is wrong, it should be 'base field' => 'uid' otherwise the view raises a "field not found" error (it can't find 'uid' in 'support_ticket').
The 'Support ticket' relationship works only because both the fk and the base field are named 'nid' but a similar correction should be applied: 'base field' => 'nid'
Just tried the corrections in a pre-production environment, everything works fine.
Comments
Comment #1
AntiNSA CreditAttribution: AntiNSA commentedI cant Fix this I dont understand exactly where to replace the code. I really need to create a relationship..... acan you clarify so I can use relationships to get assigned uyse*/rs//// ////in views/? thanks
Comment #2
Homotechsual CreditAttribution: Homotechsual commentedFixed in soon-to-be-released 6.x-1.0-rc2
Comment #3
Homotechsual CreditAttribution: Homotechsual commentedFixed in 6.x-1.0-rc2
Comment #4
Homotechsual CreditAttribution: Homotechsual commented