Link between Contact and Membership not made

Created on 9 October 2019, about 5 years ago
Updated 28 September 2023, about 1 year ago

I have created a CiviCRM Membership view with the aim of making a membership directory.

There doesn't seem to be a relationship between the membership data and the contact data so that I can pull in the name (display, sort, first, last) of the contact. This is the case for any fields I've tested from the contact table. Any table I can create a relationship to, the data pulls in as expected.

Query
SELECT civicrm_contact.id AS id, civicrm_membership_civicrm_contact.id AS civicrm_membership_civicrm_contact_id
FROM
{civicrm_contact} civicrm_contact
INNER JOIN {civicrm_membership} civicrm_membership_civicrm_contact ON civicrm_contact.id = civicrm_membership_civicrm_contact.contact_id
LIMIT 11 OFFSET 0

🐛 Bug report
Status

Fixed

Version

4.0

Component

CiviCRM Entity Views Extras

Created by

🇬🇧United Kingdom heather oliver

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇰Denmark ressa Copenhagen

    I can confirm that this works in 4.x:

    • Create a new View based on "CiviCRM Contact"
    • Add a Relationship to "CiviCRM Membership using contact_id"
    • Check "Require this relationship" to only show contacts with a membership
    • Verify by adding the field "Membership Type ID", to show the Membership Type
Production build 0.71.5 2024